From c6718689bc41178f1e1af082dcd3fa030e1e9a22 Mon Sep 17 00:00:00 2001 From: Mandy Chessell Date: Mon, 2 Sep 2024 20:41:03 +0100 Subject: [PATCH] Fixes to open lineage connectors Signed-off-by: Mandy Chessell --- .../OpenLineage-demo.http | 537 +++++ .../openLineage requests.http | 348 ++++ ...enLineage requests.postman_collection.json | 291 +++ .../OpenLineageLogStoreConnectorBase.java | 2 +- ...a-admin-services-server-configuration.http | 2 + .../server/OMAGServerErrorHandler.java | 13 +- .../Egeria-integration-daemon-services.http | 4 +- .../handlers/IntegrationGroupHandler.java | 11 + .../server/IntegrationDaemonInstance.java | 4 +- .../IntegrationDaemonInstanceHandler.java | 78 +- .../rest/LineageIntegratorRESTServices.java | 38 +- .../server/AssetCatalogRESTServices.java | 2 +- .../server/AssetCatalogUIRESTServices.java | 721 ------- .../server/spring/AssetController.java | 220 -- .../server/spring/OpenLineageController.java | 298 --- .../server/GlossaryBrowserRESTServices.java | 1846 +---------------- .../server/spring/GlossaryViewController.java | 1415 ------------- .../spring/beans/ControlledGlossaryTerm.java | 21 - .../spring/beans/ExternalGlossaryLink.java | 21 - .../server/spring/beans/Glossary.java | 57 - .../server/spring/beans/GlossaryCategory.java | 39 - .../server/spring/beans/GlossaryTerm.java | 83 - .../beans/GlossaryViewClassification.java | 120 -- .../beans/GlossaryViewEntityDetail.java | 206 -- .../GlossaryViewEntityDetailResponse.java | 102 - .../server/spring/beans/package-info.java | 7 - .../sample-configs/BuildSampleConfigs.http | 5 + .../config/active-metadata-store.config | 2 +- 28 files changed, 1384 insertions(+), 5109 deletions(-) create mode 100644 open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/OpenLineage-demo.http create mode 100644 open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/openLineage requests.http create mode 100644 open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/openLineage requests.postman_collection.json delete mode 100644 open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogUIRESTServices.java delete mode 100644 open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/AssetController.java delete mode 100644 open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/OpenLineageController.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryViewController.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/ControlledGlossaryTerm.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/ExternalGlossaryLink.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/Glossary.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryCategory.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryTerm.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewClassification.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewEntityDetail.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewEntityDetailResponse.java delete mode 100644 open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/package-info.java mode change 100644 => 100755 open-metadata-resources/open-metadata-deployment/sample-configs/active-metadata-store/config/active-metadata-store.config diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/OpenLineage-demo.http b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/OpenLineage-demo.http new file mode 100644 index 00000000000..385535b6a3f --- /dev/null +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/OpenLineage-demo.http @@ -0,0 +1,537 @@ +# Unity catalog enablement demo + +@baseURL=https://localhost:9443 +@viewServer=view-server + +### +# ===================================================================================================================== +# Manage the authentication token. Run this request to create/refresh the token. + +# @name Token (RequestBody) +POST {{baseURL}}/api/token +Content-Type: application/json + +{ + "userId" : "peterprofile", + "password" : "secret" +} + +> {% client.global.set("token", response.body); %} + + +### + +@ucServerTemplateGUID=dcca9788-b30f-4007-b1ac-ec634aff6879 +@ucCatalogTemplateGUID=5ee006aa-a6d6-411b-9b8d-5f720c079cae +@ucSchemaTemplateGUID=5bf92b0f-3970-41ea-b0a3-aacfbf6fd92e +@ucVolumeTemplateGUID=92d2d2dc-0798-41f0-9512-b10548d312b7 +@ucTableTemplateGUID=6cc1e5f5-4c1e-4290-a80e-e06643ffb13d +@ucFunctionTemplateGUID=a490ba65-6104-4213-9be9-524e16fed8aa + +### +# ===================================================================================================================== +# Create a server asset for Unity Catalog +# + +### +# @name getTechnologyTypeTemplates (Unity Catalog Server) +# Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed in the name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/technology-types/elements?startFrom=0&pageSize=10&getTemplates=true +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "filter" : "Unity Catalog Server" +} + + +### +# @name createElementFromTemplate (Unity Catalog Server 1) +# Create a new element from a template. +# Further Information: https://egeria-project.org/features/templated-cataloguing/overview/ +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/catalog-templates/new-element +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "templateGUID" : "{{ucServerTemplateGUID}}", + "isOwnAnchor" : true, + "placeholderPropertyValues" : { + "hostURL" : "http://localhost", + "portNumber" : "8080", + "serverName" : "Unity Catalog 1", + "versionIdentifier" : "V1.0", + "description" : "First instance of the Unity Catalog (UC) Server.", + "serverUserId" : "uc1" + } +} + +### + +@server1GUID=281c6358-ee6f-4009-9de9-4ef92a46f393 + + +### +# @name getTechnologyTypeElements (UC Server) +# Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed in the name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/technology-types/elements?startFrom=0&pageSize=10&getTemplates=false +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "filter" : "Unity Catalog Server" +} + + +### +# @name=getAssetGraph (UC Server 1) +# Return all the elements that are anchored to an asset plus relationships between these elements and to other elements. +# +# Asset: https://egeria-project.org/concepts/asset/ +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/asset-catalog/assets/{{server1GUID}}/as-graph?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + +### + +@ucServerSurveyName=AssetSurvey:survey-unity-catalog-server + +### +# @name initiateGovernanceActionType +# Using the named governance action type as a template, initiate a single engine action. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types/initiate +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "InitiateGovernanceActionTypeRequestBody", + "governanceActionTypeQualifiedName": "{{ucServerSurveyName}}", + "actionTargets": [ + { + "class" : "NewActionTarget", + "actionTargetName": "uc1", + "actionTargetGUID": "{{server1GUID}}" + } ] +} + + + +### +# ===================================================================================================================== +# Create a catalog target relationship between the new UC server asset and the integration connector. +# Then refresh the UC Integration Connectors to force the cataloguing (or wait an hour :) +# + +@integrationConnectorGUID=06d068d9-9e08-4e67-8c59-073bbf1013af +@friendshipGUID=74dde22f-2249-4ea3-af2b-b39e73f79b81 + +### +# @name addCatalogTarget (UC Server 1) +# Add a catalog target to the Unity Catalog Server Sync integration connector. +# Notice that details of all of the templates for different types of UC elements are passed. These +# are not used directly by this connector, but passed to the friendship connector +# (Unity Catalog Inside Catalog Sync integration conenctor) to support its cataloguing. +# Further Information: https://egeria-project.org/concepts/integration-connector/ +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/integration-connectors/{{integrationConnectorGUID}}/catalog-targets/{{server1GUID}} +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "catalogTargetName" : "uc1", + "templateProperties" : { + "Unity Catalog Catalog" : "{{ucCatalogTemplateGUID}}", + "Unity Catalog Schema" : "{{ucSchemaTemplateGUID}}", + "Unity Catalog Volume" : "{{ucVolumeTemplateGUID}}", + "Unity Catalog Table" : "{{ucTableTemplateGUID}}", + "Unity Catalog Function" : "{{ucFunctionTemplateGUID}}" + }, + "configurationProperties" : { + "UnityCatalogFriendshipGUID" : "74dde22f-2249-4ea3-af2b-b39e73f79b81" + } +} + + +### +# @name getCatalogTargets (UnityCatalogServerSynchronizer) +# Retrieve the details of the metadata elements identified as catalog targets with an integration connector. +# Further Information: https://egeria-project.org/concepts/integration-connector/ +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/integration-connectors/{{integrationConnectorGUID}}/catalog-targets?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + + + +### +# @name Refresh Integration Connector (UnityCatalogServerSynchronizer) +# Refreshes all Integration Connectors running in an integration daemon +POST {{baseURL}}/servers/integration-daemon/open-metadata/integration-daemon/users/garygeeke/integration-connectors/refresh +Content-Type: application/json + +{ + "class" : "NameRequestBody", + "name" : "UnityCatalogServerSynchronizer" +} + + +### +# @name getCatalogTargets (UnityCatalogInsideCatalogSynchronizer) +# Retrieve the details of the metadata elements identified as catalog targets with an integration connector. +# Further Information: https://egeria-project.org/concepts/integration-connector/ +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/integration-connectors/{{friendshipGUID}}/catalog-targets?startFrom=0&pageSize=20 +Authorization: Bearer {{token}} +Content-Type: application/json + + +### +# @name Refresh Integration Connector (UnityCatalogInsideCatalogSynchronizer) +# Refreshes all Integration Connectors running in an integration daemon +POST {{baseURL}}/servers/integration-daemon/open-metadata/integration-daemon/users/garygeeke/integration-connectors/refresh +Content-Type: application/json + +{ + "class" : "NameRequestBody", + "name" : "UnityCatalogInsideCatalogSynchronizer" +} + +### +# ===================================================================================================================== +# Review the elements created by the integration connectors +# +### +# @name getTechnologyTypeElements (catalogs) +# Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed in the name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/technology-types/elements?startFrom=0&pageSize=10&getTemplates=false +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "filter" : "Unity Catalog Catalog" +} + +### + +@ucCatalogGUID=add guid here + +### +# @name getTechnologyTypeElements (schemas) +# Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed in the name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/technology-types/elements?startFrom=0&pageSize=10&getTemplates=false +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "filter" : "Unity Catalog Schema" +} + +### + +@ucSchemaGUID=add guid here + +### +# @name=getAssetGraph (schemas) +# Return all the elements that are anchored to an asset plus relationships between these elements and to other elements. +# +# Asset: https://egeria-project.org/concepts/asset/ +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/asset-catalog/assets/{{ucSchemaGUID}}/as-graph?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + + +### +# @name getTechnologyTypeElements (Volumes) +# Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed in the name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/technology-types/elements?startFrom=0&pageSize=10&getTemplates=false +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "filter" : "Unity Catalog Volume" +} + +### + +@ucVolumeGUID=add guid here + +### +# @name=getAssetGraph (volumes) +# Return all the elements that are anchored to an asset plus relationships between these elements and to other elements. +# +# Asset: https://egeria-project.org/concepts/asset/ +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/asset-catalog/assets/{{ucVolumeGUID}}/as-graph?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + + +### + +@ucVolumeSurveyName=AssetSurvey:survey-unity-catalog-volume + +### +# @name initiateGovernanceActionType +# Using the named governance action type as a template, initiate a single engine action. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types/initiate +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "InitiateGovernanceActionTypeRequestBody", + "governanceActionTypeQualifiedName": "{{ucVolumeSurveyName}}", + "actionTargets": [ + { + "class" : "NewActionTarget", + "actionTargetName": "volume", + "actionTargetGUID": "{{ucVolumeGUID}}" + } ] +} + +### +# @name getTechnologyTypeElements (Tables) +# Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed in the name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/technology-types/elements?startFrom=0&pageSize=10&getTemplates=false +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "filter" : "Unity Catalog Schema" +} + +### + +@ucTableGUID=add guid here + +### +# @name=getAssetGraph (Tables) +# Return all the elements that are anchored to an asset plus relationships between these elements and to other elements. +# +# Asset: https://egeria-project.org/concepts/asset/ +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/asset-catalog/assets/{{ucTableGUID}}/as-graph?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + +### +# @name createElementFromTemplate (Unity Catalog Server 2) +# Create a new element from a template. +# Further Information: https://egeria-project.org/features/templated-cataloguing/overview/ +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/catalog-templates/new-element +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "templateGUID" : "{{ucServerTemplateGUID}}", + "isOwnAnchor" : true, + "placeholderPropertyValues" : { + "hostURL" : "http://egeria.pdr-associates.com", + "portNumber" : "8070", + "serverName" : "Unity Catalog 2", + "versionIdentifier" : "V1.0", + "description" : "Second instance of the Unity Catalog (UC) Server.", + "serverUserId" : "uc2", + "versionIdentifier" : "V1.0" + } +} + +### + +@server2GUID=add guid here + +### +# @name=getAssetGraph (UC Server 2) +# Return all the elements that are anchored to an asset plus relationships between these elements and to other elements. +# +# Asset: https://egeria-project.org/concepts/asset/ +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/asset-catalog/assets/{{server2GUID}}/as-graph?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + + +### +# @name addCatalogTarget (UC Server 2) +# Add a catalog target to the Unity Catalog Server Sync integration connector. +# Notice that details of all of the templates for different types of UC elements are passed. These +# are not used directly by this connector, but passed to the friendship connector +# (Unity Catalog Inside Catalog Sync integration conenctor) to support its cataloguing. +# Further Information: https://egeria-project.org/concepts/integration-connector/ +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/integration-connectors/{{integrationConnectorGUID}}/catalog-targets/{{server2GUID}} +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "catalogTargetName" : "uc2", + "templateProperties" : { + "Unity Catalog Catalog" : "{{ucCatalogTemplateGUID}}", + "Unity Catalog Schema" : "{{ucSchemaTemplateGUID}}", + "Unity Catalog Volume" : "{{ucVolumeTemplateGUID}}", + "Unity Catalog Table" : "{{ucTableTemplateGUID}}", + "Unity Catalog Function" : "{{ucFunctionTemplateGUID}}" + }, + "configurationProperties" : { + "UnityCatalogFriendshipGUID" : "74dde22f-2249-4ea3-af2b-b39e73f79b81" + } +} + +### + +@catalogTargetRelationshipGUID=add guid here + +### + + +### +# @name getCatalogTarget +# Retrieve a specific catalog target associated with an integration connector. +# Further Information: https://egeria-project.org/concepts/integration-connector/ +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/catalog-targets/{{catalogTargetRelationshipGUID}} +Authorization: Bearer {{token}} +Content-Type: application/json + + + +### +# @name updateCatalogTarget +# Update a catalog target for an integration connector. +# Further Information: https://egeria-project.org/concepts/integration-connector/ +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/catalog-targets/{{catalogTargetRelationshipGUID}}/update +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "catalogTargetName" : "uc2", + "templateProperties" : { + "Unity Catalog Catalog" : "{{ucCatalogTemplateGUID}}", + "Unity Catalog Schema" : "{{ucSchemaTemplateGUID}}", + "Unity Catalog Volume" : "{{ucVolumeTemplateGUID}}", + "Unity Catalog Table" : "{{ucTableTemplateGUID}}", + "Unity Catalog Function" : "{{ucFunctionTemplateGUID}}" + }, + "configurationProperties" : { + "UnityCatalogFriendshipGUID" : "74dde22f-2249-4ea3-af2b-b39e73f79b81", + "excludeCatalogNames" : "unity" + } +} + +### +# @name Refresh Integration Connector (UnityCatalogServerSynchronizer) +# Refreshes all Integration Connectors running in an integration daemon +POST {{baseURL}}/servers/integration-daemon/open-metadata/integration-daemon/users/garygeeke/integration-connectors/refresh +Content-Type: application/json + +{ + "class" : "NameRequestBody", + "name" : "UnityCatalogServerSynchronizer" +} + + + +### +# @name updateCatalogTarget +# Update a catalog target for an integration connector. +# Further Information: https://egeria-project.org/concepts/integration-connector/ +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/catalog-targets/{{catalogTargetRelationshipGUID}}/update +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "catalogTargetName" : "uc2", + "templateProperties" : { + "Unity Catalog Catalog" : "{{ucCatalogTemplateGUID}}", + "Unity Catalog Schema" : "{{ucSchemaTemplateGUID}}", + "Unity Catalog Volume" : "{{ucVolumeTemplateGUID}}", + "Unity Catalog Table" : "{{ucTableTemplateGUID}}", + "Unity Catalog Function" : "{{ucFunctionTemplateGUID}}" + }, + "configurationProperties" : { + "UnityCatalogFriendshipGUID" : "74dde22f-2249-4ea3-af2b-b39e73f79b81" + } +} + + +### +# @name getTechnologyTypeElements (UC Server) +# Retrieve the elements for the requested deployed implementation type. There are no wildcards allowed in the name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/technology-types/elements?startFrom=0&pageSize=10&getTemplates=false +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "filter" : "Unity Catalog Catalog" +} + + +### + +@catalogGUID=add guid here + +### +# @name deleteMetadataElement +# Delete a specific metadata element. + +POST {{baseURL}}/servers/active-metadata-store/open-metadata/framework-services/asset-owner/open-metadata-store/users/peterprofile/metadata-elements/{{catalogGUID}}/delete +Content-Type: application/json + + + +### +# @name createElementFromTemplate (Unity Catalog Server 3) +# Create a new element from a template. +# Further Information: https://egeria-project.org/features/templated-cataloguing/overview/ +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/catalog-templates/new-element +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "templateGUID" : "{{ucServerTemplateGUID}}", + "isOwnAnchor" : true, + "placeholderPropertyValues" : { + "hostURL" : "http://localhost", + "portNumber" : "7070", + "serverName" : "Unity Catalog 3", + "versionIdentifier" : "V1.0", + "description" : "Third instance of the Unity Catalog (UC) Server.", + "serverUserId" : "uc3" + } +} + +### + +@server3GUID=a29603dc-9163-4091-aa47-9f74ad286f0a + +### +# @name=getAssetGraph (UC Server 3) +# Return all the elements that are anchored to an asset plus relationships between these elements and to other elements. +# +# Asset: https://egeria-project.org/concepts/asset/ +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/asset-catalog/assets/{{server2GUID}}/as-graph?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + + +### +# @name addCatalogTarget (UC Server 3) +# Add a catalog target to the Unity Catalog Server Sync integration connector. +# Notice that details of all of the templates for different types of UC elements are passed. These +# are not used directly by this connector, but passed to the friendship connector +# (Unity Catalog Inside Catalog Sync integration conenctor) to support its cataloguing. +# Further Information: https://egeria-project.org/concepts/integration-connector/ +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/integration-connectors/{{integrationConnectorGUID}}/catalog-targets/{{server3GUID}} +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "catalogTargetName" : "uc3", + "templateProperties" : { + "Unity Catalog Catalog" : "{{ucCatalogTemplateGUID}}", + "Unity Catalog Schema" : "{{ucSchemaTemplateGUID}}", + "Unity Catalog Volume" : "{{ucVolumeTemplateGUID}}", + "Unity Catalog Table" : "{{ucTableTemplateGUID}}", + "Unity Catalog Function" : "{{ucFunctionTemplateGUID}}" + }, + "configurationProperties" : { + "UnityCatalogFriendshipGUID" : "74dde22f-2249-4ea3-af2b-b39e73f79b81" + } +} + +### + + +### + diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/openLineage requests.http b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/openLineage requests.http new file mode 100644 index 00000000000..31a036d7045 --- /dev/null +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/openLineage requests.http @@ -0,0 +1,348 @@ +# openLineage requests + +#@openLineageBackend=http://localhost:5000 +@openLineageBackend=https://localhost:9443/servers/integration-daemon/open-metadata/integration-services/lineage-integrator/users/airflownpa +@openLineageNamespace=restTestNameSpace +@openLineageRunId=001 + +### +# @name Onboard Data File Start +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "eventTime": "{{$isoTimestamp}}", + "eventType": "START", + "inputs": [ + { + "name": "landing-area-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "job": { + "name": "onboard-data-file", + "namespace": "{{openLineageNamespace}}" + }, + "outputs": [], + "producer": "https://www.postman.com/", + "run": { + "runId": "304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}" + } +} + +### +# @name Job1 Run Quality Analysis Start +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "eventTime": "{{$isoTimestamp}}", + "eventType": "START", + "inputs": [ + { + "name": "landing-area-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "job": { + "name": "run-quality-analysis", + "namespace": "{{openLineageNamespace}}" + }, + "outputs": [], + "producer": "https://www.postman.com/", + "run": { + "runId": "4cb8a46b-6271-4791-925c-9ae7123d1{{openLineageRunId}}" + } +} + +### +# @name Job1 Quality Report +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "eventTime": "{{$isoTimestamp}}", + "eventType": "OTHER", + "inputs": [ + { + "facets": { + "dataQualityAssertions": { + "_producer": "https://www.postman.com/", + "_schemaURL": "#/definitions/DataQualityAssertionsDatasetFacet", + "assertions": [ + { + "column": "id", + "assertion": "not_null", + "success": true + }, + { + "column": "second_id", + "assertion": "not_null", + "success": true + }, + { + "column": "id", + "assertion": "unique", + "success": true + }, + { + "column": "second_id", + "assertion": "unique", + "success": true + } + ] + } + }, + "name": "landing-area-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "job": { + "facets": {}, + "name": "run-quality-analysis", + "namespace": "{{openLineageNamespace}}" + }, + "outputs": [], + "producer": "https://www.postman.com/", + "run": { + "facets": { + "parent": { + "_producer": "https://www.postman.com/", + "_schemaURL": "https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/ParentRunFacet", + "job": {"name": "onboard-data-file", "namespace": "{{openLineageNamespace}}"}, + "run": {"runId": "304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}"} + } + }, + "runId": "4cb8a46b-6271-4791-925c-9ae7123d1{{openLineageRunId}}" + } +} + +### +# @name Job1 Run Quality Analysis End +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "eventTime": "{{$isoTimestamp}}", + "eventType": "COMPLETE", + "inputs": [ + { + "facets": {}, + "name": "landing-area-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "job": { + "facets": {}, + "name": "run-quality-analysis", + "namespace": "{{openLineageNamespace}}" + }, + "outputs": [], + "producer": "https://www.postman.com/", + "run": { + "facets": { + "parent": { + "_producer": "https://www.postman.com/", + "_schemaURL": "https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/ParentRunFacet", + "job": {"name": "onboard-data-file", "namespace": "{{openLineageNamespace}}"}, + "run": {"runId": "304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}"} + } + }, + "runId": "4cb8a46b-6271-4791-925c-9ae7123d1{{openLineageRunId}}" + } +} + +### +# @name Job2 Categorise Data File Start +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "eventTime": "{{$isoTimestamp}}", + "eventType": "START", + "inputs": [ + { + "name": "landing-area-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "job": { + "name": "categorise-data-file", + "namespace": "{{openLineageNamespace}}" + }, + "outputs": [], + "producer": "https://www.postman.com/", + "run": { + "runId": "ecea439e-228c-4264-82d9-4a82576d5{{openLineageRunId}}" + } +} + +### +# @name Job2 Categorise Data File End +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "eventTime": "{{$isoTimestamp}}", + "eventType": "COMPLETE", + "inputs": [ + { + "facets": {}, + "name": "landing-area-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "job": { + "name": "categorise-data-file", + "namespace": "{{openLineageNamespace}}" + }, + "outputs": [], + "producer": "https://www.postman.com/", + "run": { + "facets": { + "parent": { + "_producer": "https://www.postman.com/", + "_schemaURL": "https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/ParentRunFacet", + "job": {"name": "onboard-data-file", "namespace": "{{openLineageNamespace}}"}, + "run": {"runId": "304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}"} + } + }, + "runId": "ecea439e-228c-4264-82d9-4a82576d5{{openLineageRunId}}" + } +} + +### +# @name Job3 Move Data File Start +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "eventTime": "{{$isoTimestamp}}", + "eventType": "START", + "inputs": [ + { + "name": "landing-area-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "job": { + "name": "move-data-file", + "namespace": "{{openLineageNamespace}}" + }, + "outputs": [], + "producer": "https://www.postman.com/", + "run": { + "runId": "d4736e42-125d-436f-97ce-34b11940d{{openLineageRunId}}" + } +} + +### +# @name Job3 Move Data File End +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "eventTime": "{{$isoTimestamp}}", + "eventType": "COMPLETE", + "inputs": [ + { + "facets": {}, + "name": "landing-area-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "job": { + "facets": {}, + "name": "move-data-file", + "namespace": "{{openLineageNamespace}}" + }, + "outputs": [ + { + "facets": {}, + "name": "data-lake-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "producer": "https://www.postman.com/", + "run": { + "facets": { + "parent": { + "_producer": "https://www.postman.com/", + "_schemaURL": "https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/ParentRunFacet", + "job": {"name": "onboard-data-file", "namespace": "{{openLineageNamespace}}"}, + "run": {"runId": "304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}"} + } + }, + "runId": "d4736e42-125d-436f-97ce-34b11940d{{openLineageRunId}}" + } +} + +### +# @name Onboard Data File Complete +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "eventTime": "{{$isoTimestamp}}", + "eventType": "COMPLETE", + "inputs": [ + { + "facets": {}, + "name": "landing-area-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "job": { + "facets": {}, + "name": "onboard-data-file", + "namespace": "{{openLineageNamespace}}" + }, + "outputs": [ + { + "facets": {}, + "name": "data-lake-file", + "namespace": "{{openLineageNamespace}}" + } + ], + "producer": "https://www.postman.com/", + "run": { + "facets": {}, + "runId": "304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}" + } +} + +### +# @name Test +POST {{openLineageBackend}}/api/v1/lineage +Content-Type: application/json + +{ + "producer": "https://egeria-project.org/", + "schemaURL": "https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/RunEvent", + "eventType": "COMPLETE", + "eventTime": "2021-11-05T10:28:18.969066Z[Europe/London]", + "run": { + "runId": "ce649429-2b5d-4897-899d-0e3a0c1fef44", + "facets": { + "nominalTime": { + "_producer": "https://egeria-project.org/", + "_schemaURL": "https://openlineage.io/spec/facets/1-0-0/NominalTimeRunFacet.json#/$defs/NominalTimeRunFacet", + "nominalStartTime": "2021-11-05T10:28:10.076Z[Europe/London]", + "nominalEndTime": "2021-11-05T10:28:13.502Z[Europe/London]" + }, + "additionalProperties": {} + }, + "additionalProperties": {} + }, + "job": { + "namespace": "initiateGovernanceAction", + "name": "AssetGovernance:copy-file" + }, + "inputs": [], + "outputs": [ + { + "namespace": "initiateGovernanceAction", + "name": "provisioning-complete" + } + ] +} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/openLineage requests.postman_collection.json b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/openLineage requests.postman_collection.json new file mode 100644 index 00000000000..950d6f49e3c --- /dev/null +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/openLineage requests.postman_collection.json @@ -0,0 +1,291 @@ +{ + "info": { + "_postman_id": "1dfa2283-a0e6-457c-843a-768b14e4405b", + "name": "openLineage requests", + "description": "This postman collection includes requests to an endpoint called {{openLineageBackend}}/api/v1/lineage that supports the receipt of openLineage events.", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "28623075" + }, + "item": [ + { + "name": "Onboard Data File Start", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"eventTime\": \"{{$isoTimestamp}}\",\n \"eventType\": \"START\",\n \"inputs\": [\n {\n \"name\": \"landing-area-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"job\": {\n \"name\": \"onboard-data-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n },\n \"outputs\": [],\n \"producer\": \"https://www.postman.com/\",\n \"run\": {\n \"runId\": \"304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + }, + { + "name": "Job1 Run Quality Analysis Start", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"eventTime\": \"{{$isoTimestamp}}\",\n \"eventType\": \"START\",\n \"inputs\": [\n {\n \"name\": \"landing-area-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"job\": {\n \"name\": \"run-quality-analysis\",\n \"namespace\": \"{{openLineageNamespace}}\"\n },\n \"outputs\": [],\n \"producer\": \"https://www.postman.com/\",\n \"run\": {\n \"runId\": \"4cb8a46b-6271-4791-925c-9ae7123d1{{openLineageRunId}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + }, + { + "name": "Job1 Quality Report", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"eventTime\": \"{{$isoTimestamp}}\",\n \"eventType\": \"OTHER\",\n \"inputs\": [\n {\n \"facets\": {\n \"dataQualityAssertions\": {\n \"_producer\": \"https://www.postman.com/\",\n \"_schemaURL\": \"#/definitions/DataQualityAssertionsDatasetFacet\",\n \"assertions\": [\n {\n \"column\": \"id\",\n \"assertion\": \"not_null\",\n \"success\": true\n },\n {\n \"column\": \"second_id\",\n \"assertion\": \"not_null\",\n \"success\": true\n },\n {\n \"column\": \"id\",\n \"assertion\": \"unique\",\n \"success\": true\n },\n {\n \"column\": \"second_id\",\n \"assertion\": \"unique\",\n \"success\": true\n }\n ]\n }\n },\n \"name\": \"landing-area-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"job\": {\n \"facets\": {},\n \"name\": \"run-quality-analysis\",\n \"namespace\": \"{{openLineageNamespace}}\"\n },\n \"outputs\": [],\n \"producer\": \"https://www.postman.com/\",\n \"run\": {\n \"facets\": {\n \"parent\": {\n \"_producer\": \"https://www.postman.com/\",\n \"_schemaURL\": \"https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/ParentRunFacet\",\n \"job\": {\"name\": \"onboard-data-file\", \"namespace\": \"{{openLineageNamespace}}\"},\n \"run\": {\"runId\": \"304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}\"}\n }\n },\n \"runId\": \"4cb8a46b-6271-4791-925c-9ae7123d1{{openLineageRunId}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + }, + { + "name": "Job1 Run Quality Analysis End", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"eventTime\": \"{{$isoTimestamp}}\",\n \"eventType\": \"COMPLETE\",\n \"inputs\": [\n {\n \"facets\": {},\n \"name\": \"landing-area-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"job\": {\n \"facets\": {},\n \"name\": \"run-quality-analysis\",\n \"namespace\": \"{{openLineageNamespace}}\"\n },\n \"outputs\": [],\n \"producer\": \"https://www.postman.com/\",\n \"run\": {\n \"facets\": {\n \"parent\": {\n \"_producer\": \"https://www.postman.com/\",\n \"_schemaURL\": \"https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/ParentRunFacet\",\n \"job\": {\"name\": \"onboard-data-file\", \"namespace\": \"{{openLineageNamespace}}\"},\n \"run\": {\"runId\": \"304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}\"}\n }\n },\n \"runId\": \"4cb8a46b-6271-4791-925c-9ae7123d1{{openLineageRunId}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + }, + { + "name": "Job2 Categorise Data File Start", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"eventTime\": \"{{$isoTimestamp}}\",\n \"eventType\": \"START\",\n \"inputs\": [\n {\n \"name\": \"landing-area-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"job\": {\n \"name\": \"categorise-data-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n },\n \"outputs\": [],\n \"producer\": \"https://www.postman.com/\",\n \"run\": {\n \"runId\": \"ecea439e-228c-4264-82d9-4a82576d5{{openLineageRunId}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + }, + { + "name": "Job2 Categorise Data File End", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"eventTime\": \"{{$isoTimestamp}}\",\n \"eventType\": \"COMPLETE\",\n \"inputs\": [\n {\n \"facets\": {},\n \"name\": \"landing-area-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"job\": {\n \"name\": \"categorise-data-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n },\n \"outputs\": [],\n \"producer\": \"https://www.postman.com/\",\n \"run\": {\n \"facets\": {\n \"parent\": {\n \"_producer\": \"https://www.postman.com/\",\n \"_schemaURL\": \"https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/ParentRunFacet\",\n \"job\": {\"name\": \"onboard-data-file\", \"namespace\": \"{{openLineageNamespace}}\"},\n \"run\": {\"runId\": \"304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}\"}\n }\n },\n \"runId\": \"ecea439e-228c-4264-82d9-4a82576d5{{openLineageRunId}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + }, + { + "name": "Job3 Move Data File Start", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"eventTime\": \"{{$isoTimestamp}}\",\n \"eventType\": \"START\",\n \"inputs\": [\n {\n \"name\": \"landing-area-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"job\": {\n \"name\": \"move-data-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n },\n \"outputs\": [],\n \"producer\": \"https://www.postman.com/\",\n \"run\": {\n \"runId\": \"d4736e42-125d-436f-97ce-34b11940d{{openLineageRunId}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + }, + { + "name": "Job3 Move Data File End", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"eventTime\": \"{{$isoTimestamp}}\",\n \"eventType\": \"COMPLETE\",\n \"inputs\": [\n {\n \"facets\": {},\n \"name\": \"landing-area-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"job\": {\n \"facets\": {},\n \"name\": \"move-data-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n },\n \"outputs\": [\n {\n \"facets\": {},\n \"name\": \"data-lake-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"producer\": \"https://www.postman.com/\",\n \"run\": {\n \"facets\": {\n \"parent\": {\n \"_producer\": \"https://www.postman.com/\",\n \"_schemaURL\": \"https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/ParentRunFacet\",\n \"job\": {\"name\": \"onboard-data-file\", \"namespace\": \"{{openLineageNamespace}}\"},\n \"run\": {\"runId\": \"304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}\"}\n }\n },\n \"runId\": \"d4736e42-125d-436f-97ce-34b11940d{{openLineageRunId}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + }, + { + "name": "Onboard Data File Complete", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"eventTime\": \"{{$isoTimestamp}}\",\n \"eventType\": \"COMPLETE\",\n \"inputs\": [\n {\n \"facets\": {},\n \"name\": \"landing-area-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"job\": {\n \"facets\": {},\n \"name\": \"onboard-data-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n },\n \"outputs\": [\n {\n \"facets\": {},\n \"name\": \"data-lake-file\",\n \"namespace\": \"{{openLineageNamespace}}\"\n }\n ],\n \"producer\": \"https://www.postman.com/\",\n \"run\": {\n \"facets\": {},\n \"runId\": \"304e5f23-4667-4d26-9499-2f30d8e17{{openLineageRunId}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + }, + { + "name": "Test", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"producer\":\"https://egeria-project.org/\",\n \"schemaURL\":\"https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/RunEvent\",\n \"eventType\":\"COMPLETE\",\n \"eventTime\":\"2021-11-05T10:28:18.969066Z[Europe/London]\",\n \"run\":\n {\n \"runId\":\"ce649429-2b5d-4897-899d-0e3a0c1fef44\",\n \"facets\":\n {\n \"nominalTime\":\n {\n \"_producer\":\"https://egeria-project.org/\",\n \"_schemaURL\":\"https://openlineage.io/spec/facets/1-0-0/NominalTimeRunFacet.json#/$defs/NominalTimeRunFacet\",\n \"nominalStartTime\":\"2021-11-05T10:28:10.076Z[Europe/London]\",\n \"nominalEndTime\":\"2021-11-05T10:28:13.502Z[Europe/London]\"\n },\n \"additionalProperties\":{}\n },\n \"additionalProperties\":{}\n },\n \"job\":\n {\n \"namespace\":\"initiateGovernanceAction\",\n \"name\":\"AssetGovernance:copy-file\"\n },\n \"inputs\":[],\n \"outputs\":\n [\n {\n \"namespace\":\"initiateGovernanceAction\",\n \"name\":\"provisioning-complete\"\n }\n ]\n \n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{openLineageBackend}}/api/v1/lineage", + "host": [ + "{{openLineageBackend}}" + ], + "path": [ + "api", + "v1", + "lineage" + ] + } + }, + "response": [] + } + ] +} \ No newline at end of file diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageLogStoreConnectorBase.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageLogStoreConnectorBase.java index 2effd46e8df..37da26d8825 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageLogStoreConnectorBase.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageLogStoreConnectorBase.java @@ -222,7 +222,7 @@ else if (propertyHelper.isTypeOf(catalogTarget.getCatalogTargetElement(), OpenMe if (connectionElement != null) { - RelatedMetadataElement endpointElement = myContext.getIntegrationGovernanceContext().getOpenMetadataAccess().getRelatedMetadataElement(catalogTarget.getCatalogTargetElement().getGUID(), + RelatedMetadataElement endpointElement = myContext.getIntegrationGovernanceContext().getOpenMetadataAccess().getRelatedMetadataElement(connectionElement.getElement().getElementGUID(), 2, OpenMetadataType.CONNECTION_ENDPOINT_TYPE_NAME, new Date()); diff --git a/open-metadata-implementation/admin-services/Egeria-admin-services-server-configuration.http b/open-metadata-implementation/admin-services/Egeria-admin-services-server-configuration.http index da5a7700674..14b23b45f32 100644 --- a/open-metadata-implementation/admin-services/Egeria-admin-services-server-configuration.http +++ b/open-metadata-implementation/admin-services/Egeria-admin-services-server-configuration.http @@ -392,6 +392,8 @@ GET {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{ser # Retrieve the configuration information for all of the Open Metadata Access Services (OMASs) configured for this server. GET {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/access-services/configuration +### +@accessService=community-profile ### # group: Configuring OMAG Servers / Configuration for Cohort Members / Configuration for Metadata Access Points # @name Get the configuration for a specific access service diff --git a/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/server/OMAGServerErrorHandler.java b/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/server/OMAGServerErrorHandler.java index 2d09db5af4c..b5091fed051 100644 --- a/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/server/OMAGServerErrorHandler.java +++ b/open-metadata-implementation/admin-services/admin-services-server/src/main/java/org/odpi/openmetadata/adminservices/server/OMAGServerErrorHandler.java @@ -115,18 +115,19 @@ void validateIntegrationServiceConfig(String serverName, IntegrationServiceRequestBody integrationServiceConfig, String methodName) throws OMAGInvalidParameterException { - final String connectorConfigsPropertyName = "integrationServerConfig.connectorConfigs"; final String connectorConfigPropertyName = "integrationServerConfig.connectorConfig"; final String connectorNamePropertyName = "integrationServerConfig.connectorConfig.connectorName"; this.validateOMAGServerClientConfig(serverName, integrationServiceConfig, methodName); - this.validatePropertyNotNull(integrationServiceConfig.getIntegrationConnectorConfigs(), connectorConfigsPropertyName, serverName, methodName); - for (IntegrationConnectorConfig connectorConfig : integrationServiceConfig.getIntegrationConnectorConfigs()) + if (integrationServiceConfig.getIntegrationConnectorConfigs() != null) { - this.validatePropertyNotNull(connectorConfig, connectorConfigPropertyName, serverName, methodName); - this.validatePropertyNotNull(connectorConfig.getConnectorName(), connectorNamePropertyName, serverName, methodName); - this.validateServerConnection(connectorConfig.getConnection(), serverName, methodName); + for (IntegrationConnectorConfig connectorConfig : integrationServiceConfig.getIntegrationConnectorConfigs()) + { + this.validatePropertyNotNull(connectorConfig, connectorConfigPropertyName, serverName, methodName); + this.validatePropertyNotNull(connectorConfig.getConnectorName(), connectorNamePropertyName, serverName, methodName); + this.validateServerConnection(connectorConfig.getConnection(), serverName, methodName); + } } } diff --git a/open-metadata-implementation/governance-server-services/integration-daemon-services/Egeria-integration-daemon-services.http b/open-metadata-implementation/governance-server-services/integration-daemon-services/Egeria-integration-daemon-services.http index 94c103f97dc..40dd9d05fd5 100644 --- a/open-metadata-implementation/governance-server-services/integration-daemon-services/Egeria-integration-daemon-services.http +++ b/open-metadata-implementation/governance-server-services/integration-daemon-services/Egeria-integration-daemon-services.http @@ -2,7 +2,7 @@ @baseURL=https://localhost:9443 @server=integration-daemon -@user=peterprofile +@user=garygeeke ### # group: Integration Services @@ -21,7 +21,7 @@ GET {{baseURL}}/servers/{{server}}/open-metadata/integration-services/files-inte # group: Integration Services # @name Refresh All integration Connectors # Refreshes all Integration Connectors running in an integration daemon -POST {{baseURL}}/servers/{{server}}/open-metadata/integration-daemon/users/{{user}}/refresh +POST {{baseURL}}/servers/{{server}}/open-metadata/integration-daemon/users/{{user}}/integration-connectors/refresh ### # group: Integration Services diff --git a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/handlers/IntegrationGroupHandler.java b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/handlers/IntegrationGroupHandler.java index 41215f84c54..303f4d2556b 100644 --- a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/handlers/IntegrationGroupHandler.java +++ b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/handlers/IntegrationGroupHandler.java @@ -164,6 +164,17 @@ public String getIntegrationGroupGUID() return integrationGroupGUID; } + /** + * Return the context manager for the requested service. + * + * @param serviceURLMarker identifier for the service + * @return context manager or null + */ + public IntegrationContextManager getContextManager(String serviceURLMarker) + { + return contextManagerMap.get(serviceURLMarker); + } + /** * Request that the integration group refresh its configuration by calling the metadata server. diff --git a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/IntegrationDaemonInstance.java b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/IntegrationDaemonInstance.java index 3022ecc370b..1539b75d970 100644 --- a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/IntegrationDaemonInstance.java +++ b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/IntegrationDaemonInstance.java @@ -92,8 +92,8 @@ synchronized IntegrationServiceHandler getIntegrationServiceHandler(String servi if (handler == null) { - throw new InvalidParameterException(IntegrationDaemonServicesErrorCode.UNKNOWN_INTEGRATION_SERVICE.getMessageDefinition(serverName, - serviceURLMarker), + throw new InvalidParameterException(IntegrationDaemonServicesErrorCode.UNKNOWN_INTEGRATION_SERVICE.getMessageDefinition(serviceURLMarker, + serverName), this.getClass().getName(), serviceOperationName, nameParameterName); diff --git a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/IntegrationDaemonInstanceHandler.java b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/IntegrationDaemonInstanceHandler.java index 5a74278e46d..c11d1ec0e9d 100644 --- a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/IntegrationDaemonInstanceHandler.java +++ b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-server/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/IntegrationDaemonInstanceHandler.java @@ -3,18 +3,16 @@ package org.odpi.openmetadata.governanceservers.integrationdaemonservices.server; import org.odpi.openmetadata.adminservices.configuration.registration.GovernanceServicesDescription; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.commonservices.ffdc.rest.StringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.multitenant.GovernanceServerServiceInstanceHandler; -import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.*; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; import org.odpi.openmetadata.frameworks.integration.contextmanager.IntegrationContextManager; +import org.odpi.openmetadata.governanceservers.integrationdaemonservices.handlers.IntegrationGroupHandler; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.handlers.IntegrationServiceHandler; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.properties.IntegrationConnectorReport; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.properties.IntegrationGroupSummary; +import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -104,23 +102,77 @@ public IntegrationServiceHandler getIntegrationServiceHandler(String userId, * @throws UserNotAuthorizedException user does not have access to the requested server * @throws PropertyServerException the service name is not known - indicating a logic error */ - public IntegrationContextManager getIntegrationServiceContextManager(String userId, - String serverName, - String serviceURLMarker, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public List getIntegrationServiceContextManagers(String userId, + String serverName, + String serviceURLMarker, + String serviceOperationName) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { IntegrationDaemonInstance instance = (IntegrationDaemonInstance)super.getServerServiceInstance(userId, serverName, serviceOperationName); if (instance != null) { - IntegrationServiceHandler handler = instance.getIntegrationServiceHandler(serviceURLMarker, serviceOperationName); + /* + * There are potentially multiple context managers for a particular service - one may be explicitly + * configured as a service; and there will be one in each integration group that has a lineage connector + * registered. + */ + List contextManagers = new ArrayList<>(); - if (handler != null) + IntegrationServiceHandler serviceHandler = null; + InvalidParameterException invalidParameterException = null; + + try + { + serviceHandler = instance.getIntegrationServiceHandler(serviceURLMarker, serviceOperationName); + } + catch (InvalidParameterException notKnownException) { - return handler.getContextManager(); + /* + * We will use this exception if there are no context managers for this service in the integration groups. + */ + invalidParameterException = notKnownException; } + + if (serviceHandler != null) + { + contextManagers.add(serviceHandler.getContextManager()); + } + + List groupHandlers = instance.getAllIntegrationGroupHandlers(serviceOperationName); + + if (groupHandlers != null) + { + for (IntegrationGroupHandler groupHandler : groupHandlers) + { + if (groupHandler != null) + { + IntegrationContextManager contextManager = groupHandler.getContextManager(serviceURLMarker); + if (contextManager != null) + { + contextManagers.add(contextManager); + } + } + } + } + + if (!contextManagers.isEmpty()) + { + return contextManagers; + } + + /* + * There are no context managers so throw the saved exception. + */ + if (invalidParameterException != null) + { + throw invalidParameterException; + } + + /* + * Technically unreachable. + */ } return null; diff --git a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/lineage/rest/LineageIntegratorRESTServices.java b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/lineage/rest/LineageIntegratorRESTServices.java index 9115890da6d..91e046dd620 100644 --- a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/lineage/rest/LineageIntegratorRESTServices.java +++ b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/lineage/rest/LineageIntegratorRESTServices.java @@ -10,6 +10,7 @@ import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.adminservices.configuration.registration.IntegrationServiceDescription; +import org.odpi.openmetadata.frameworks.integration.contextmanager.IntegrationContextManager; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.registration.IntegrationServiceRegistry; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.server.IntegrationDaemonInstanceHandler; import org.odpi.openmetadata.integrationservices.lineage.connector.LineageIntegratorConnector; @@ -17,6 +18,8 @@ import org.odpi.openmetadata.integrationservices.lineage.contextmanager.LineageIntegratorContextManager; import org.slf4j.LoggerFactory; +import java.util.List; + /** * LineageIntegratorRESTServices provides the ability to validate that a connector will run successfully in this integration service. @@ -51,7 +54,6 @@ public LineageIntegratorRESTServices() * @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 for this service; * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException there was a problem detected by the integration service @@ -98,15 +100,10 @@ public ConnectorReportResponse validateConnector(String serverName, * @param serverName integration daemon server name * @param userId calling user * @param event open lineage event to publish. - * - * @return void or - * InvalidParameterException one of the parameters is null or invalid; - * UserNotAuthorizedException the caller is not authorized to call the service or - * PropertyServerException there is a problem processing the request */ - public VoidResponse publishOpenLineageEvent(String serverName, - String userId, - String event) + public void publishOpenLineageEvent(String serverName, + String userId, + String event) { final String methodName = "publishOpenLineageEvent"; @@ -119,12 +116,21 @@ public VoidResponse publishOpenLineageEvent(String serverName, { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - LineageIntegratorContextManager contextManager = - (LineageIntegratorContextManager)instanceHandler.getIntegrationServiceContextManager(userId, - serverName, - IntegrationServiceDescription.LINEAGE_INTEGRATOR_OMIS.getIntegrationServiceURLMarker(), - methodName); - contextManager.publishOpenLineageRunEvent(event); + List contextManagers = instanceHandler.getIntegrationServiceContextManagers(userId, + serverName, + IntegrationServiceDescription.LINEAGE_INTEGRATOR_OMIS.getIntegrationServiceURLMarker(), + methodName); + + if (contextManagers != null) + { + for (IntegrationContextManager contextManager : contextManagers) + { + if (contextManager instanceof LineageIntegratorContextManager lineageIntegratorContextManager) + { + lineageIntegratorContextManager.publishOpenLineageRunEvent(event); + } + } + } } catch (Exception error) { @@ -132,7 +138,5 @@ public VoidResponse publishOpenLineageEvent(String serverName, } restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; } } diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogRESTServices.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogRESTServices.java index 0e79e597f88..7687fab179b 100644 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogRESTServices.java +++ b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogRESTServices.java @@ -32,7 +32,7 @@ /** - * The AssetCatalogUIRESTServices provides the implementation of the Asset Catalog Open Metadata View Service (OMVS). + * The AssetCatalogRESTServices provides the implementation of the Asset Catalog Open Metadata View Service (OMVS). * This interface provides view interfaces for glossary UIs. */ diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogUIRESTServices.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogUIRESTServices.java deleted file mode 100644 index e89c26a2730..00000000000 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogUIRESTServices.java +++ /dev/null @@ -1,721 +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.assetcatalog.server; - -import org.odpi.openmetadata.accessservices.assetconsumer.client.OpenMetadataStoreClient; -import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; -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.openmetadata.enums.ElementStatus; -import org.odpi.openmetadata.frameworks.openmetadata.enums.SequencingOrder; -import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.governanceaction.properties.AttachedClassification; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.search.*; -import org.odpi.openmetadata.tokencontroller.TokenController; -import org.odpi.openmetadata.viewservices.assetcatalog.beans.*; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.*; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - - -/** - * The AssetCatalogUIRESTServices provides the implementation of the Asset Catalog Open Metadata View Service (OMVS). - * This interface provides view interfaces for glossary UIs. - */ - -public class AssetCatalogUIRESTServices extends TokenController -{ - private static final AssetCatalogInstanceHandler instanceHandler = new AssetCatalogInstanceHandler(); - - private static final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); - - private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(AssetCatalogUIRESTServices.class), - instanceHandler.getServiceName()); - - private final PropertyHelper propertyHelper = new PropertyHelper(); - - private final String sourceName = ViewServiceDescription.ASSET_CATALOG.getViewServiceName(); - - private final List activeElementsOnly = new ArrayList<>(Collections.singleton(ElementStatus.ACTIVE)); - - /** - * Default constructor - */ - public AssetCatalogUIRESTServices() - { - } - - - /** - * Returns the list with supported types for search, including the subtypes supported. - * The list is deduplicated. - * - * @param serverName name of the server to route the request to - * @return the supported types from Asset Consumer OMAS or - * PropertyServerException if a configuration on the backend - * InvalidParameterException if parameter validation fails - * UserNotAuthorizedException security access problem - */ - public AssetCatalogSupportedTypes getSupportedTypes(String serverName) - { - final String methodName = "getSupportedTypes"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - AssetCatalogSupportedTypes response = new AssetCatalogSupportedTypes(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - response.setTypes(instanceHandler.getSupportedAssetTypes(userId, serverName, methodName)); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Return a list of assets matching the search criteria without the full context - * - * @param serverName name of the server to route the request to - * @param searchCriteria the query parameter with the search phrase - * @param typeNames 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 startFrom the offset for the results - * @param pageSize the number of results per page - * @return list of assets or - * PropertyServerException if a configuration on the backend - * UserNotAuthorizedException security access problem - * InvalidParameterException if parameter validation fails - */ - public AssetListResponse searchAssets(String serverName, - String searchCriteria, - List typeNames, - String sequencingProperty, - SequencingOrder sequencingOrder, - boolean caseSensitive, - boolean exactMatch, - Integer startFrom, - Integer pageSize) - { - final String methodName = "searchAssets"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - AssetListResponse response = new AssetListResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - OpenMetadataStoreClient handler = instanceHandler.getOpenMetadataStoreClient(userId, serverName, methodName); - - SearchProperties searchProperties = new SearchProperties(); - List propertyConditions = new ArrayList<>(); - - propertyConditions.add(this.getSearchStringPropertyCondition(searchCriteria, exactMatch, caseSensitive)); - - searchProperties.setConditions(propertyConditions); - - searchProperties.setMatchCriteria(MatchCriteria.ALL); - - List results = handler.findMetadataElements(userId, - null, - null, - searchProperties, - activeElementsOnly, - null, - this.getMatchClassifications(instanceHandler.getSupportedAssetTypes(userId, serverName, methodName), - typeNames), - sequencingProperty, - sequencingOrder, - false, - false, - null, - startFrom, - pageSize); - - response.setElementsList(this.getElementsList(results)); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Set up the property condition that represents the requested search string. - * - * @param searchCriteria value from caller - * @param exactMatch do they want an exact match? - * @param caseSensitive set case sensitive flag - * @return property condition - */ - private PropertyCondition getSearchStringPropertyCondition(String searchCriteria, - boolean exactMatch, - boolean caseSensitive) - { - PropertyCondition propertyCondition = new PropertyCondition(); - - String searchString; - if (exactMatch) - { - searchString = searchCriteria; - } - else - { - searchString = instanceHandler.getSearchString(searchCriteria, false, false, !caseSensitive); - } - - PrimitiveTypePropertyValue propertyValue = new PrimitiveTypePropertyValue(); - propertyValue.setPrimitiveValue(searchString); - propertyValue.setPrimitiveTypeCategory(PrimitiveTypeCategory.OM_PRIMITIVE_TYPE_STRING); - propertyCondition.setValue(propertyValue); - - return propertyCondition; - } - - - /** - * Return the classification conditions that matches the anchor classifications of the - * correct type. - * - * @param supportAssetTypes list of requested types (supplied in the view service options or derived from the list of asset types. - * @param requestedAssetTypes list of asset types from user - * @return SearchClassifications - */ - private SearchClassifications getMatchClassifications(List supportAssetTypes, - List requestedAssetTypes) - { - SearchClassifications searchClassifications = new SearchClassifications(); - List classificationConditions = new ArrayList<>(); - - for (Type type : supportAssetTypes) - { - if ((type != null) && (requestedAssetTypes != null) && (requestedAssetTypes.contains(type.getName()))) - { - ClassificationCondition classificationCondition = new ClassificationCondition(); - - classificationCondition.setName(OpenMetadataType.ANCHORS_CLASSIFICATION.typeName); - - SearchProperties searchProperties = new SearchProperties(); - - List typeNamePropertyConditions = new ArrayList<>(); - PropertyCondition typeNamePropertyCondition = new PropertyCondition(); - - typeNamePropertyCondition.setProperty(OpenMetadataProperty.ANCHOR_TYPE_NAME.name); - - PrimitiveTypePropertyValue propertyValue = new PrimitiveTypePropertyValue(); - propertyValue.setPrimitiveValue(type.getName()); - propertyValue.setPrimitiveTypeCategory(PrimitiveTypeCategory.OM_PRIMITIVE_TYPE_STRING); - - typeNamePropertyCondition.setValue(propertyValue); - typeNamePropertyCondition.setOperator(PropertyComparisonOperator.EQ); - - typeNamePropertyConditions.add(typeNamePropertyCondition); - - searchProperties.setConditions(typeNamePropertyConditions); - searchProperties.setMatchCriteria(MatchCriteria.ALL); - - classificationCondition.setSearchProperties(searchProperties); - - classificationConditions.add(classificationCondition); - } - } - - searchClassifications.setConditions(classificationConditions); - searchClassifications.setMatchCriteria(MatchCriteria.ANY); - - return searchClassifications; - } - - - /** - * Return a list of assets matching the type name without the full context - * The list includes also subtypes - * - * @param serverName name of the server to route the request to - * @param typeName the assets type name to search for - * @return list of assets by type name or - * PropertyServerException if a configuration on the backend - * UserNotAuthorizedException security access problem - * InvalidParameterException if parameter validation fails - */ - public AssetListResponse searchAssetsByTypeName(String serverName, - String typeName) - { - // todo - return null; - } - - - /** - * Return a list of assets matching the type GUID without the full context - * The list includes also subtypes - * - * @param serverName name of the server to route the request to - * @param typeGUID the assets type GUID to search for - * @return list of assets by type GUID or - * PropertyServerException if a configuration on the backend - * UserNotAuthorizedException security access problem - * InvalidParameterException if parameter validation fails - */ - public AssetListResponse searchAssetsByTypeGUID(String serverName, - String typeGUID) - { - // todo - return null; - } - - - /** - * Fetch asset's header, classification and properties. - * - * @param serverName name of the server to route the request to - * @param guid of the Entity to be retrieved - * @return the entity details or - * PropertyServerException if a configuration on the backend - * UserNotAuthorizedException security access problem - * InvalidParameterException if parameter validation fails - */ - public AssetCatalogResponse getAsset(String serverName, - String guid) - { - // todo - return null; - } - - - /** - * 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 name of the server to route the request to - * @param guid of the Entity to be retrieved - * @return the entity context or - * PropertyServerException if a configuration on the backend - * UserNotAuthorizedException security access problem - * InvalidParameterException if parameter validation fails - */ - public AssetResponse getAssetContext(String serverName, - String guid) - { - // todo - return null; - } - - - - /** - * Return the nodes and relationships that describe the know ultimate sources of the starting element. - * - * @param serverName name of the server to route the request to - * @param guid unique identifier of the starting element - * @param includeProcesses if true Process nodes will be included - * @return graph of nodes and edges describing the ultimate sources of the asset or - * InvalidParameterException from the underlying service, - * PropertyServerException from the underlying service or - * UserNotAuthorizedException from the underlying service - */ - public LineageResponse getUltimateSource(String serverName, - String guid, - boolean includeProcesses) - { - // todo - return null; - } - - - /** - * Return the graph of nodes that describe the end-to-end lineage for the starting element. - * - * @param serverName name of the server to route the request to - * @param guid unique identifier of the starting element - * @param includeProcesses if true Process nodes will be included - * @return graph of nodes and edges describing the end to end flow or - * InvalidParameterException from the underlying service, - * PropertyServerException from the underlying service or - * UserNotAuthorizedException from the underlying service - */ - public LineageResponse getEndToEndLineage(String serverName, - String guid, - boolean includeProcesses) - { - // todo - return null; - } - - - /** - * Return the nodes and relationships that describe the know ultimate destinations of the starting element. - * - * @param serverName name of the server to route the request to - * @param guid unique identifier of the starting element - * @param includeProcesses if true Process nodes will be included - * @return graph of nodes and edges describing the ultimate destination of the asset or - * InvalidParameterException from the underlying service, - * PropertyServerException from the underlying service or - * UserNotAuthorizedException from the underlying service - */ - public LineageResponse getUltimateDestination(String serverName, - String guid, - boolean includeProcesses) - { - // todo - return null; - } - - - /** - * Retrieve details of the asset related elements linked to a glossary term via the semantic assignment relationship. - * - * @param serverName name of the server to route the request to - * @param guid unique identifier of the starting glossary term element - * @param includeProcesses if true Process nodes will be included - * @return graph of nodes and edges describing the assets linked to the glossary term or - * InvalidParameterException from the underlying service, - * PropertyServerException from the underlying service or - * UserNotAuthorizedException from the underlying service - */ - public LineageResponse getSemanticLineage(String serverName, - String guid, - boolean includeProcesses) - { - // todo - return null; - } - - - /** - * Retrieves the details of a specific node in the lineage graph. - * - * @param serverName name of the server to route the request to - * @param guid of the Entity to be retrieved - * @return the entity details or - * InvalidParameterException from the underlying service, - * PropertyServerException from the underlying service or - * UserNotAuthorizedException from the underlying service - */ - public LineageVertexResponse getLineageVertex(String serverName, - String guid) - { - // todo - return null; - } - - - /** - * Gets available entities types from lineage repository. - * - * @param serverName name of the server to route the request to - * @return the available entities types or - * InvalidParameterException from the underlying service, - * PropertyServerException from the underlying service or - * UserNotAuthorizedException from the underlying service - */ - public LineageTypesResponse getTypes(String serverName) - { - // todo - return null; - } - - - /** - * Gets nodes names of certain type with display name containing a certain value. - * - * @param serverName name of the server to route the request to - * @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 or - * InvalidParameterException from the underlying service, - * PropertyServerException from the underlying service or - * UserNotAuthorizedException from the underlying service - */ - public LineageNodeNamesResponse getNodes(String serverName, - String type, - String searchValue, - int limit) - { - // todo - return null; - } - - - /** - * Returns the list of vertices that the user will initially see when querying lineage. In the future, this method will be - * extended to condense large paths to prevent cluttering of the users screen. The user will be able to extend - * the condensed path by querying a different method. - * - * @param serverName name of the server to route the request to - * @param searchRequest filtering details for the search - * @return list of graph nodes or - * InvalidParameterException from the underlying service, - * PropertyServerException from the underlying service or - * UserNotAuthorizedException from the underlying service - */ - public LineageSearchResponse searchForVertices(String serverName, - LineageSearchRequest searchRequest) - { - // todo - return null; - } - - - /** - * Returns a subgraph representing the hierarchy of a certain node, based on the request. - * - * @param serverName name of the server to route the request to - * @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 or - * InvalidParameterException from the underlying service, - * PropertyServerException from the underlying service or - * UserNotAuthorizedException from the underlying service - */ - public LineageResponse getElementHierarchy(String serverName, - ElementHierarchyRequest elementHierarchyRequest) - { - // todo - return null; - } - - - private List getElementsList(List openMetadataElements) - { - // todo - return null; - } - - - /** - * - * @param openMetadataElement - * @return - */ - private Element getElement(OpenMetadataElement openMetadataElement) - { - final String methodName = "getElement"; - - if (openMetadataElement != null) - { - Elements result = new Elements(); - - result.setGuid(openMetadataElement.getElementGUID()); - result.setType(this.getType(openMetadataElement.getType())); - result.setName(propertyHelper.getStringProperty(instanceHandler.getServiceName(), - OpenMetadataProperty.NAME.name, - openMetadataElement.getElementProperties(), - methodName)); - - - return result; - } - - return null; - } - - - private AssetCatalogBean getAssetCatalogBean(OpenMetadataElement openMetadataElement, - List openMetadataRelationshipList, - Element anchorElement, - String methodName) - { - if (openMetadataElement != null) - { - AssetCatalogBean assetCatalogBean = new AssetCatalogBean(); - - assetCatalogBean.setGuid(openMetadataElement.getElementGUID()); - assetCatalogBean.setType(this.getType(openMetadataElement.getType())); - assetCatalogBean.setCreatedBy(openMetadataElement.getVersions().getCreatedBy()); - assetCatalogBean.setCreateTime(openMetadataElement.getVersions().getCreateTime()); - assetCatalogBean.setUpdatedBy(openMetadataElement.getVersions().getUpdatedBy()); - assetCatalogBean.setUpdateTime(openMetadataElement.getVersions().getUpdateTime()); - assetCatalogBean.setVersion(openMetadataElement.getVersions().getVersion()); - assetCatalogBean.setStatus(openMetadataElement.getStatus().getName()); - assetCatalogBean.setClassifications(this.getClassifications(openMetadataElement.getClassifications())); - assetCatalogBean.setOrigin(this.getElementOrigin(openMetadataElement.getOrigin())); - assetCatalogBean.setUrl("/api/open-metadata/asset-catalog/assets/" + openMetadataElement.getElementGUID()); - - - if (openMetadataElement.getElementProperties() != null) - { - /* - * Properties that are explicitly mapped are removed from the copy of the element properties. The properties that are left are - * added to the assetCatalogBean's properties value. - */ - ElementProperties elementProperties = new ElementProperties((openMetadataElement.getElementProperties())); - - assetCatalogBean.setName(propertyHelper.removeStringProperty(sourceName, - OpenMetadataProperty.NAME.name, - elementProperties, - methodName)); - - if (assetCatalogBean.getName() == null) - { - assetCatalogBean.setName(propertyHelper.removeStringProperty(sourceName, - OpenMetadataProperty.DISPLAY_NAME.name, - elementProperties, - methodName)); - } - - if (assetCatalogBean.getName() == null) - { - assetCatalogBean.setName(propertyHelper.removeStringProperty(sourceName, - OpenMetadataProperty.QUALIFIED_NAME.name, - elementProperties, - methodName)); - } - - assetCatalogBean.setAdditionalProperties(propertyHelper.removeStringMapFromProperty(sourceName, - OpenMetadataProperty.ADDITIONAL_PROPERTIES.name, - elementProperties, - methodName)); - - assetCatalogBean.setProperties(elementProperties.getPropertiesAsStrings()); - assetCatalogBean.setAnchorElement(anchorElement); - } - - assetCatalogBean.setRelationships(this.getRelationships(openMetadataRelationshipList)); - } - - return null; - } - - - /** - * Convert a list classifications from open metadata to the asset catalog format. - * - * @param openMetadataClassifications classifications retrieved from the open metadata repositories - * @return classification format used by asset catalog - */ - private List getClassifications(List openMetadataClassifications) - { - if (openMetadataClassifications != null) - { - List results = new ArrayList<>(); - - for (AttachedClassification openMetadataClassification : openMetadataClassifications) - { - - } - - return results; - } - - return null; - } - - - /** - * Return a list of relationships in the Asset Catalog OMVS format. - * - * @param openMetadataRelationshipList relationships retrieved from the open metadata store - * @return reformatted relationships - */ - private List getRelationships(List openMetadataRelationshipList) - { - if (openMetadataRelationshipList != null) - { - List results = new ArrayList<>(); - - for (OpenMetadataRelationship openMetadataRelationship : openMetadataRelationshipList) - { - - } - - return results; - } - - return null; - } - - - /** - * Return the element origin in the Asset Catalog OMVS format. - * - * @param openMetadataElementOrigin retrieved origin - * @return reformatted origin - */ - private ElementOrigin getElementOrigin(org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin openMetadataElementOrigin) - { - if (openMetadataElementOrigin != null) - { - ElementOrigin result = new ElementOrigin(); - - result.setInstanceLicense(openMetadataElementOrigin.getLicense()); - result.setOriginCategory(openMetadataElementOrigin.getOriginCategory()); - result.setMetadataCollectionId(openMetadataElementOrigin.getHomeMetadataCollectionId()); - result.setMetadataCollectionName(openMetadataElementOrigin.getHomeMetadataCollectionName()); - result.setSourceServer(openMetadataElementOrigin.getSourceServer()); - - return result; - } - - return null; - } - - - /** - * Convert the open metadata type information into the required format. - * - * @param openMetadataType retrieved type information - * @return type information in Asset Catalog format - */ - private Type getType(ElementType openMetadataType) - { - if (openMetadataType != null) - { - Type type = new Type(); - - type.setName(openMetadataType.getTypeName()); - type.setDescription(openMetadataType.getTypeDescription()); - type.setVersion(openMetadataType.getTypeVersion()); - - if ((openMetadataType.getSuperTypeNames() != null) && (! openMetadataType.getSuperTypeNames().isEmpty())) - { - type.setSuperType(openMetadataType.getSuperTypeNames().get(0)); - } - - return type; - } - - return null; - } -} diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/AssetController.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/AssetController.java deleted file mode 100644 index c8b9d1d0106..00000000000 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/AssetController.java +++ /dev/null @@ -1,220 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.assetcatalog.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -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.frameworks.openmetadata.enums.SequencingOrder; -import org.odpi.openmetadata.viewservices.assetcatalog.beans.AssetCatalogBean; -import org.odpi.openmetadata.viewservices.assetcatalog.beans.Elements; -import org.odpi.openmetadata.viewservices.assetcatalog.beans.Type; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.AssetCatalogResponse; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.AssetCatalogSupportedTypes; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.AssetListResponse; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.AssetResponse; -import org.odpi.openmetadata.viewservices.assetcatalog.server.AssetCatalogUIRESTServices; -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("/servers/{serverName}/api/open-metadata/asset-catalog/old/assets") - -@Tag(name="API: Asset Catalog OMVS", - description="Search for assets, retrieve their properties, lineage and related glossary information.", - externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/services/omvs/asset-catalog/overview/")) - -@Deprecated -/** - * Original REST Resource - */ -public class AssetController -{ - private final RESTExceptionHandler exceptionHandler = new RESTExceptionHandler(); - - private final AssetCatalogUIRESTServices restAPI = new AssetCatalogUIRESTServices(); - - /** - * Return a list of assets matching the search criteria without the full context - * - * @param serverName name of the server to route the request to - * @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 UserNotAuthorizedException security access problem - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( path = "/search") - public List searchAssets(@PathVariable String serverName, - @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, - UserNotAuthorizedException, - InvalidParameterException - { - final String methodName = "searchAssets"; - - AssetListResponse restResult = restAPI.searchAssets(serverName, - searchCriteria, - types, - sequencingProperty, - sequencingOrder, - caseSensitive, - exactMatch, - from, - pageSize); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getElementsList(); - } - - - /** - * Return a list of assets matching the type name without the full context - * The list includes also subtypes - * - * @param serverName name of the server to route the request to - * @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 UserNotAuthorizedException security access problem - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( path = "/search-by-type-name/{typeName}") - public List searchAssetsByTypeName(@PathVariable String serverName, - @PathVariable("typeName") String typeName) throws PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException - { - final String methodName = "searchAssetsByTypeName"; - - AssetListResponse restResult = restAPI.searchAssetsByTypeName(serverName, typeName); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getElementsList(); - } - - /** - * Return a list of assets matching the type GUID without the full context - * The list includes also subtypes - * - * @param serverName name of the server to route the request to - * @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 UserNotAuthorizedException security access problem - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( path = "/search-by-type-guid/{typeGUID}") - public List searchAssetsByTypeGUID(@PathVariable String serverName, - @PathVariable("typeGUID") String typeGUID) throws PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException - { - final String methodName = "searchAssetsByTypeGUID"; - - AssetListResponse restResult = restAPI.searchAssetsByTypeGUID(serverName, typeGUID); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getElementsList(); - } - - /** - * Returns the list with supported types for search, including the subtypes supported - * - * @param serverName name of the server to route the request to - * @return the supported types from Asset Consumer OMAS - * @throws PropertyServerException if a configuration on the backend - * @throws InvalidParameterException if parameter validation fails - * @throws UserNotAuthorizedException security access problem - */ - @GetMapping( path = "/types") - public List getSupportedTypes(@PathVariable String serverName) throws PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException - { - final String methodName = "getSupportedTypes"; - - AssetCatalogSupportedTypes restResult = restAPI.getSupportedTypes(serverName); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getTypes(); - } - - - /** - * Fetch asset's header, classification and properties. - * - * @param serverName name of the server to route the request to - * @param guid of the Entity to be retrieved - * @return the entity details - * @throws PropertyServerException if a configuration on the backend - * @throws UserNotAuthorizedException security access problem - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( value = "/{guid}") - public AssetCatalogBean getAsset(@PathVariable String serverName, - @PathVariable("guid") String guid) throws PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException - { - final String methodName = "getAsset"; - - AssetCatalogResponse restResult = restAPI.getAsset(serverName, guid); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getAssetCatalogBean(); - } - - - /** - * 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 name of the server to route the request to - * @param guid of the Entity to be retrieved - * @return the entity context - * @throws PropertyServerException if a configuration on the backend - * @throws UserNotAuthorizedException security access problem - * @throws InvalidParameterException if parameter validation fails - */ - @GetMapping( value = "/{guid}/context") - public Elements getAssetContext(@PathVariable String serverName, - @PathVariable("guid") String guid) throws PropertyServerException, - UserNotAuthorizedException, - InvalidParameterException - { - final String methodName = "getAssetContext"; - - AssetResponse restResult = restAPI.getAssetContext(serverName, guid); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getAsset(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/OpenLineageController.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/OpenLineageController.java deleted file mode 100644 index f988a0ad052..00000000000 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/OpenLineageController.java +++ /dev/null @@ -1,298 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.assetcatalog.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -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.viewservices.assetcatalog.beans.Graph; -import org.odpi.openmetadata.viewservices.assetcatalog.beans.LineageVertex; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.ElementHierarchyRequest; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.LineageNodeNamesResponse; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.LineageResponse; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.LineageSearchRequest; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.LineageSearchResponse; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.LineageTypesResponse; -import org.odpi.openmetadata.viewservices.assetcatalog.rest.LineageVertexResponse; -import org.odpi.openmetadata.viewservices.assetcatalog.server.AssetCatalogUIRESTServices; -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; - -import java.util.List; - -/** - * This controller serves all requests for retrieving lineage details, both vertical and horizontal. It originated in the Egeria UI application. - * It is deprecated because it does not follow the exception handling rules for Egeria code. The replacement services are in AssetCatalogResource. - */ -@RestController -@RequestMapping("/servers/{serverName}/api/open-metadata/asset-catalog/old/lineage") - -@Tag(name="API: Asset Catalog OMVS", - description="Search for assets, retrieve their properties, lineage and related glossary information.", - externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/services/omvs/asset-catalog/overview/")) - -@Deprecated -public class OpenLineageController -{ - private final RESTExceptionHandler exceptionHandler = new RESTExceptionHandler(); - - private final AssetCatalogUIRESTServices restAPI = new AssetCatalogUIRESTServices(); - - /** - * Return the nodes and relationships that describe the know ultimate sources of the starting element. - * - * @param serverName name of the server to route the request to - * @param guid unique identifier of the starting element - * @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 UserNotAuthorizedException from the underlying service - */ - @GetMapping( value = "/entities/{guid}/ultimate-source") - public Graph getUltimateSource(@PathVariable String serverName, - @PathVariable("guid") String guid, - @RequestParam boolean includeProcesses) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "getUltimateSource"; - - LineageResponse restResult = restAPI.getUltimateSource(serverName, guid, includeProcesses); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getGraph(); - } - - - /** - * Return the graph of nodes that describe the end-to-end lineage for the starting element. - * - * @param serverName name of the server to route the request to - * @param guid unique identifier of the starting element - * @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 UserNotAuthorizedException from the underlying service - */ - @GetMapping( value = {"/entities/{guid}/end-to-end", "/entities/{guid}/end2end"}) - - public Graph getEndToEndLineage(@PathVariable String serverName, - @PathVariable("guid") String guid, - @RequestParam boolean includeProcesses) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "getEndToEndLineage"; - - LineageResponse restResult = restAPI.getEndToEndLineage(serverName, guid, includeProcesses); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getGraph(); - } - - - /** - * Return the nodes and relationships that describe the know ultimate destinations of the starting element. - * - * @param serverName name of the server to route the request to - * @param guid unique identifier of the starting element - * @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 UserNotAuthorizedException from the underlying service - */ - @GetMapping( value = "/entities/{guid}/ultimate-destination") - public Graph getUltimateDestination(@PathVariable String serverName, - @PathVariable("guid") String guid, - @RequestParam boolean includeProcesses) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "getUltimateDestination"; - - LineageResponse restResult = restAPI.getUltimateDestination(serverName, guid, includeProcesses); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getGraph(); - } - - - /** - * Retrieve details of the asset related elements linked to a glossary term via the semantic assignment relationship. - * - * @param serverName name of the server to route the request to - * @param guid unique identifier of the starting glossary term element - * @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 UserNotAuthorizedException from the underlying service - */ - @GetMapping( value = {"/entities/{guid}/vertical-lineage", "/entities/{guid}/semantic-lineage"}) - - public Graph getSemanticLineage(@PathVariable String serverName, - @PathVariable("guid") String guid, - @RequestParam boolean includeProcesses) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "getSemanticLineage"; - - LineageResponse restResult = restAPI.getSemanticLineage(serverName, guid, includeProcesses); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getGraph(); - } - - - /** - * Gets entity details. - * - * @param serverName name of the server to route the request to - * @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 UserNotAuthorizedException from the underlying service - */ - @GetMapping( value = "entities/{guid}/details") - - public LineageVertex getLineageVertex(@PathVariable String serverName, - @PathVariable("guid") String guid) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "getLineageVertex"; - - LineageVertexResponse restResult = restAPI.getLineageVertex(serverName, guid); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getLineageVertex(); - } - - - /** - * Retrieves available entity types from lineage repository. - * - * @param serverName name of the server to route the request to - * @return the available entities types - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws UserNotAuthorizedException from the underlying service - */ - @GetMapping( value = "types") - public List getTypes(@PathVariable String serverName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "getTypes"; - - LineageTypesResponse restResult = restAPI.getTypes(serverName); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getTypes(); - } - - - /** - * Gets nodes names of certain type with display name containing a certain value. - * - * @param serverName name of the server to route the request to - * @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 - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws UserNotAuthorizedException from the underlying service - */ - @GetMapping( value = "nodes") - public List getNodes(@PathVariable String serverName, - @RequestParam("type") String type, - @RequestParam("name") String searchValue, - @RequestParam("limit") int limit) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "getNodes"; - - LineageNodeNamesResponse restResult = restAPI.getNodes(serverName, type, searchValue, limit); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getNames(); - } - - - /** - * Returns the nodes that the user will initially see when querying lineage. In the future, this method will be - * extended to condense large paths to prevent cluttering of the users screen. The user will be able to extend - * the condensed path by querying a different method. - * - * @param serverName name of the server to route the request to - * @param searchRequest filtering details for the search - * @return the entity details - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws UserNotAuthorizedException from the underlying service - */ - @PostMapping( value = "entities/search") - public List searchForVertices(@PathVariable String serverName, - @RequestBody LineageSearchRequest searchRequest) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "searchForVertices"; - - LineageSearchResponse restResult = restAPI.searchForVertices(serverName, searchRequest); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getVertices(); - } - - - /** - * Returns a subgraph representing the hierarchy of a certain node, based on the request. - * - * @param serverName name of the server to route the request to - * @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, - * @throws InvalidParameterException from the underlying service - * @throws PropertyServerException from the underlying service - * @throws UserNotAuthorizedException from the underlying service - */ - @PostMapping(value = "elements/hierarchy") - public Graph getElementHierarchy(@PathVariable String serverName, - @RequestBody ElementHierarchyRequest elementHierarchyRequest) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - final String methodName = "getElementHierarchy"; - - LineageResponse restResult = restAPI.getElementHierarchy(serverName, elementHierarchyRequest); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult.getGraph(); - } -} diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/GlossaryBrowserRESTServices.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/GlossaryBrowserRESTServices.java index 0d16472be6c..ca6a0063009 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/GlossaryBrowserRESTServices.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/GlossaryBrowserRESTServices.java @@ -1568,1523 +1568,30 @@ public GlossaryTermElementsResponse getGlossaryTermHistory(String se return response; } - - /** - * Adds a star rating and optional review text to the element. If the user has already attached - * a rating then the original one is over-ridden. - * - * @param serverName name of the server instances for this request - * @param guid String - unique id for the element. - * @param isPublic is this visible to other people - * @param requestBody containing the StarRating and user review of referenceable (probably element). - * - * @return void or - * InvalidParameterException - one of the parameters is null or invalid or - * PropertyServerException - there is a problem adding the element properties to - * the metadata repository or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public VoidResponse addRatingToElement(String serverName, - String guid, - boolean isPublic, - RatingProperties requestBody) - { - final String methodName = "addRatingToElement"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - if (requestBody != null) - { - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler.addRatingToElement(userId, guid, isPublic, requestBody); - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, RatingProperties.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Removes a star rating that was added to the element by this user. - * - * @param serverName name of the server instances for this request - * @param guid String - unique id for the rating object - * @param requestBody null request body needed to satisfy the HTTP Post request - * - * @return void or - * InvalidParameterException - one of the parameters is null or invalid or - * PropertyServerException - there is a problem updating the element properties in - * the metadata repository or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - @SuppressWarnings(value = "unused") - public VoidResponse removeRatingFromElement(String serverName, - String guid, - NullRequestBody requestBody) - { - final String methodName = "removeRatingFromElement"; - final String guidParameterName = "guid"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - handler.removeRatingFromElement(userId, guid); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Adds a "LikeProperties" to the element. - * - * @param serverName name of the server instances for this request - * @param guid String - unique id for the element. - * @param isPublic is this visible to other people - * @param requestBody feedback request body . - * - * @return void or - * InvalidParameterException - one of the parameters is null or invalid or - * PropertyServerException - there is a problem adding the element properties to - * the metadata repository or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - @SuppressWarnings(value = "unused") - public VoidResponse addLikeToElement(String serverName, - String guid, - boolean isPublic, - NullRequestBody requestBody) - { - final String methodName = "addLikeToElement"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - handler.addLikeToElement(userId, guid, isPublic); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Removes a "LikeProperties" added to the element by this user. - * - * @param serverName name of the server instances for this request - * @param guid String - unique id for the like object - * @param requestBody null request body needed to satisfy the HTTP Post request - * - * @return void or - * InvalidParameterException - one of the parameters is null or invalid or - * PropertyServerException - there is a problem updating the element properties in - * the metadata repository or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - @SuppressWarnings(value = "unused") - public VoidResponse removeLikeFromElement(String serverName, - String guid, - NullRequestBody requestBody) - { - final String methodName = "removeLikeFromElement"; - final String guidParameterName = "guid"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - handler.removeLikeFromElement(userId, guid); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Adds a comment to the element. - * - * @param serverName name of the server instances for this request - * @param guid String - unique id for the element. - * @param isPublic is this visible to other people - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody containing type of comment enum and the text of the comment. - * - * @return guid for new comment object or - * InvalidParameterException - one of the parameters is null or invalid or - * PropertyServerException - there is a problem adding the element properties to - * the metadata repository or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public GUIDResponse addCommentToElement(String serverName, - String guid, - boolean isPublic, - boolean forLineage, - boolean forDuplicateProcessing, - ReferenceableUpdateRequestBody requestBody) - { - final String methodName = "addCommentToElement"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - GUIDResponse response = new GUIDResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - if (requestBody.getElementProperties() instanceof CommentProperties commentProperties) - { - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - response.setGUID(handler.addCommentToElement(userId, - guid, - isPublic, - commentProperties, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); - } - else - { - restExceptionHandler.handleInvalidPropertiesObject(CommentProperties.class.getName(), methodName); - } - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, ReferenceableUpdateRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Adds a reply to a comment. - * - * @param serverName name of the server instances for this request - * @param commentGUID String - unique id for an existing comment. Used to add a reply to a comment. - * @param isPublic is this visible to other people - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody containing type of comment enum and the text of the comment. - * - * @return guid for new comment object or - * InvalidParameterException - one of the parameters is null or invalid or - * PropertyServerException - there is a problem adding the element properties to - * the metadata repository or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public GUIDResponse addCommentReply(String serverName, - String commentGUID, - boolean isPublic, - boolean forLineage, - boolean forDuplicateProcessing, - ReferenceableUpdateRequestBody requestBody) - { - final String methodName = "addCommentReply"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - GUIDResponse response = new GUIDResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - if (requestBody.getElementProperties() instanceof CommentProperties commentProperties) - { - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - response.setGUID(handler.addCommentReply(userId, - commentGUID, - isPublic, - commentProperties, - null, - forLineage, - forDuplicateProcessing)); - } - else - { - restExceptionHandler.handleInvalidPropertiesObject(CommentProperties.class.getName(), methodName); - } - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, ReferenceableUpdateRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Update an existing comment. - * - * @param serverName name of the server instances for this request. - * @param commentGUID unique identifier for the comment to change. - * @param isMergeUpdate should the new properties be merged with existing properties (true) or completely replace them (false)? - * @param isPublic is this visible to other people - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody containing type of comment enum and the text of the comment. - * - * @return void or - * InvalidParameterException one of the parameters is null or invalid. - * PropertyServerException There is a problem updating the element properties in the metadata repository. - * UserNotAuthorizedException the requesting user is not authorized to issue this request. - */ - public VoidResponse updateComment(String serverName, - String commentGUID, - boolean isMergeUpdate, - boolean isPublic, - boolean forLineage, - boolean forDuplicateProcessing, - ReferenceableUpdateRequestBody requestBody) - { - final String methodName = "updateComment"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - if (requestBody.getElementProperties() instanceof CommentProperties commentProperties) - { - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - handler.updateComment(userId, - commentGUID, - isMergeUpdate, - isPublic, - commentProperties, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing); - } - else - { - restExceptionHandler.handleInvalidPropertiesObject(CommentProperties.class.getName(), methodName); - } - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, ReferenceableUpdateRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Link a comment that contains the best answer to a question posed in another comment. - * - * @param serverName name of the server to route the request to - * @param questionCommentGUID unique identifier of the comment containing the question - * @param answerCommentGUID unique identifier of the comment containing the accepted answer - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody properties to help with the mapping of the elements in the external asset manager and open metadata - * - * @return void or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) - */ - public VoidResponse setupAcceptedAnswer(String serverName, - String questionCommentGUID, - String answerCommentGUID, - boolean forLineage, - boolean forDuplicateProcessing, - RelationshipRequestBody requestBody) - { - final String methodName = "setupAcceptedAnswer"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - if (requestBody != null) - { - if (requestBody.getProperties() instanceof FeedbackProperties feedbackProperties) - { - handler.setupAcceptedAnswer(userId, - questionCommentGUID, - answerCommentGUID, - feedbackProperties, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing); - } - else - { - restExceptionHandler.handleInvalidPropertiesObject(CommentProperties.class.getName(), methodName); - } - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, RelationshipRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Unlink a comment that contains an answer to a question posed in another comment. - * - * @param serverName name of the server to route the request to - * @param questionCommentGUID unique identifier of the comment containing the question - * @param answerCommentGUID unique identifier of the comment containing the accepted answer - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody properties to help with the mapping of the elements in the external asset manager and open metadata - * - * @return void or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) - */ - public VoidResponse clearAcceptedAnswer(String serverName, - String questionCommentGUID, - String answerCommentGUID, - boolean forLineage, - boolean forDuplicateProcessing, - EffectiveTimeQueryRequestBody requestBody) - { - final String methodName = "clearAcceptedAnswer"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - if (requestBody != null) - { - handler.clearAcceptedAnswer(userId, - questionCommentGUID, - answerCommentGUID, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing); - } - else - { - handler.clearAcceptedAnswer(userId, - questionCommentGUID, - answerCommentGUID, - null, - forLineage, - forDuplicateProcessing); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Removes a comment added to the element by this user. - * - * @param serverName name of the server instances for this request - * @param elementGUID String - unique id for the element object - * @param commentGUID String - unique id for the comment object - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody null request body needed to satisfy the HTTP Post request - * - * @return void or - * InvalidParameterException - one of the parameters is null or invalid or - * PropertyServerException - there is a problem updating the element properties in - * the metadata repository or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - @SuppressWarnings(value = "unused") - public VoidResponse removeCommentFromElement(String serverName, - String elementGUID, - String commentGUID, - boolean forLineage, - boolean forDuplicateProcessing, - ReferenceableUpdateRequestBody requestBody) - { - final String guidParameterName = "commentGUID"; - final String methodName = "removeElementComment"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - if (requestBody != null) - { - handler.removeComment(userId, - commentGUID, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing); - } - else - { - handler.removeComment(userId, - commentGUID, - null, - forLineage, - forDuplicateProcessing); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Return the requested comment. - * - * @param serverName name of the server instances for this request - * @param commentGUID unique identifier for the comment object. - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody effectiveTime and asset manager identifiers - * @return comment properties or - * InvalidParameterException one of the parameters is null or invalid. - * PropertyServerException there is a problem updating the element properties in the property server. - * UserNotAuthorizedException the user does not have permission to perform this request. - */ - public CommentElementResponse getCommentByGUID(String serverName, - String commentGUID, - boolean forLineage, - boolean forDuplicateProcessing, - EffectiveTimeQueryRequestBody requestBody) - { - final String methodName = "getComment"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - CommentElementResponse response = new CommentElementResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - response.setElement(handler.getComment(userId, - commentGUID, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); - } - else - { - response.setElement(handler.getComment(userId, - commentGUID, - null, - forLineage, - forDuplicateProcessing)); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Return the comments attached to an element. - * - * @param serverName name of the server instances for this request - * @param elementGUID unique identifier for the element that the comments are connected to (maybe a comment too). - * @param startFrom index of the list to start from (0 for start) - * @param pageSize maximum number of elements to return. - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody effectiveTime and asset manager identifiers - * @return list of comments or - * InvalidParameterException one of the parameters is null or invalid. - * PropertyServerException there is a problem updating the element properties in the property server. - * UserNotAuthorizedException the user does not have permission to perform this request. - */ - public CommentElementsResponse getAttachedComments(String serverName, - String elementGUID, - int startFrom, - int pageSize, - boolean forLineage, - boolean forDuplicateProcessing, - EffectiveTimeQueryRequestBody requestBody) - { - final String methodName = "getAttachedComments"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - CommentElementsResponse response = new CommentElementsResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - response.setElementList(handler.getAttachedComments(userId, - elementGUID, - startFrom, - pageSize, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); - } - else - { - response.setElementList(handler.getAttachedComments(userId, - elementGUID, - startFrom, - pageSize, - null, - forLineage, - forDuplicateProcessing)); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Retrieve the list of comment metadata elements that contain the search string. - * The search string is treated as a regular expression. - * - * @param serverName name of the server to route the request to - * @param startFrom paging start point - * @param pageSize maximum results that can be returned - * @param startsWith does the value start with the supplied string? - * @param endsWith does the value end with the supplied string? - * @param ignoreCase should the search ignore case? - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody string to find in the properties - * - * @return list of matching metadata elements or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) - */ - public CommentElementsResponse findComments(String serverName, - int startFrom, - int pageSize, - boolean startsWith, - boolean endsWith, - boolean ignoreCase, - boolean forLineage, - boolean forDuplicateProcessing, - SearchStringRequestBody requestBody) - { - final String methodName = "findComments"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - CommentElementsResponse response = new CommentElementsResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - response.setElementList(handler.findComments(userId, - instanceHandler.getSearchString(requestBody.getSearchString(), startsWith, endsWith, ignoreCase), - startFrom, - pageSize, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, SearchStringRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Creates a new informal tag and returns the unique identifier for it. - * - * @param serverName name of the server instances for this request - * @param requestBody contains the name of the tag and (optional) description of the tag - * - * @return guid for new tag or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public GUIDResponse createInformalTag(String serverName, - TagProperties requestBody) - { - final String methodName = "createTag"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - GUIDResponse response = new GUIDResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - if (requestBody != null) - { - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setGUID(handler.createInformalTag(userId, requestBody)); - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, TagProperties.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Updates the description of an existing tag (either private or public). - * - * @param serverName name of the server instances for this request - * @param tagGUID unique id for the tag. - * @param requestBody contains the name of the tag and (optional) description of the tag. - * - * @return void or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public VoidResponse updateTagDescription(String serverName, - String tagGUID, - InformalTagUpdateRequestBody requestBody) - { - final String methodName = "updateTagDescription"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - if (requestBody != null) - { - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - handler.updateTagDescription(userId, - tagGUID, - requestBody.getDescription()); - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, InformalTagUpdateRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Removes a tag from the repository. All the relationships to referenceables are lost. - * - * @param serverName name of the server instances for this request - * @param tagGUID unique id for the tag. - * @param requestBody null request body. - * - * @return void or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - @SuppressWarnings(value = "unused") - public VoidResponse deleteTag(String serverName, - String tagGUID, - NullRequestBody requestBody) - { - final String methodName = "deleteTag"; - final String tagGUIDParameterName = "tagGUID"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - handler.deleteTag(userId, tagGUID); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Return the tag for the supplied unique identifier (guid). - * - * @param serverName name of the server instances for this request - * @param guid unique identifier of the tag. - * - * @return Tag object or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public InformalTagResponse getTag(String serverName, - String guid) - { - final String methodName = "getTag"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - InformalTagResponse response = new InformalTagResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setTag(handler.getTag(userId, guid)); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Return the list of tags exactly matching the supplied name. - * - * @param serverName name of the server instances for this request - * @param requestBody name of tag. - * @param startFrom index of the list to start from (0 for start) - * @param pageSize maximum number of elements to return. - * - * @return tag list or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public InformalTagsResponse getTagsByName(String serverName, - NameRequestBody requestBody, - int startFrom, - int pageSize) - { - final String methodName = "getTagsByName"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - InformalTagsResponse response = new InformalTagsResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - response.setTags(handler.getTagsByName(userId, - requestBody.getName(), - startFrom, - pageSize)); - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Return the list of the calling user's private tags exactly matching the supplied name. - * - * @param serverName name of the server instances for this request - * @param requestBody name of tag. - * @param startFrom index of the list to start from (0 for start) - * @param pageSize maximum number of elements to return. - * - * @return tag list or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public InformalTagsResponse getMyTagsByName(String serverName, - NameRequestBody requestBody, - int startFrom, - int pageSize) - { - final String methodName = "getMyTagsByName"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - InformalTagsResponse response = new InformalTagsResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - response.setTags(handler.getMyTagsByName(userId, - requestBody.getName(), - startFrom, - pageSize)); - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, NameRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Return the list of tags containing the supplied string in either the name or description. - * - * @param serverName name of the server to route the request to - * @param startFrom paging start point - * @param pageSize maximum results that can be returned - * @param startsWith does the value start with the supplied string? - * @param endsWith does the value end with the supplied string? - * @param ignoreCase should the search ignore case? - * @param requestBody string to find in the properties - * - * @return tag list or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public InformalTagsResponse findTags(String serverName, - int startFrom, - int pageSize, - boolean startsWith, - boolean endsWith, - boolean ignoreCase, - SearchStringRequestBody requestBody) - { - final String methodName = "findTags"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - InformalTagsResponse response = new InformalTagsResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - response.setTags(handler.findTags(userId, - instanceHandler.getSearchString(requestBody.getSearchString(), startsWith, endsWith, ignoreCase), - startFrom, - pageSize)); - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, SearchStringRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Return the list of the calling user's private tags containing the supplied string in either the name or description. - * - * @param serverName name of the server to route the request to - * @param startFrom paging start point - * @param pageSize maximum results that can be returned - * @param startsWith does the value start with the supplied string? - * @param endsWith does the value end with the supplied string? - * @param ignoreCase should the search ignore case? - * @param requestBody string to find in the properties - * - * @return tag list or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public InformalTagsResponse findMyTags(String serverName, - int startFrom, - int pageSize, - boolean startsWith, - boolean endsWith, - boolean ignoreCase, - SearchStringRequestBody requestBody) - { - final String methodName = "findMyTags"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - InformalTagsResponse response = new InformalTagsResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - response.setTags(handler.findMyTags(userId, - instanceHandler.getSearchString(requestBody.getSearchString(), startsWith, endsWith, ignoreCase), - startFrom, - pageSize)); - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, SearchStringRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Adds a tag (either private of public) to an element. - * - * @param serverName name of the server instances for this request - * @param elementGUID unique id for the element. - * @param tagGUID unique id of the tag. - * @param requestBody feedback request body. - * - * @return void or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - public VoidResponse addTagToElement(String serverName, - String elementGUID, - String tagGUID, - FeedbackProperties requestBody) - { - final String methodName = "addTagToElement"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - boolean isPublic = false; - - if (requestBody != null) - { - isPublic = requestBody.getIsPublic(); - } - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - handler.addTagToElement(userId, elementGUID, tagGUID, isPublic); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Removes a tag from the element that was added by this user. - * - * @param serverName name of the server instances for this request - * @param elementGUID unique id for the element. - * @param tagGUID unique id for the tag. - * @param requestBody null request body needed for correct protocol exchange. - * - * @return void or - * InvalidParameterException - one of the parameters is invalid or - * PropertyServerException - there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ - @SuppressWarnings(value = "unused") - public VoidResponse removeTagFromElement(String serverName, - String elementGUID, - String tagGUID, - NullRequestBody requestBody) - { - final String methodName = "removeTagFromElement"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - VoidResponse response = new VoidResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - handler.removeTagFromElement(userId, elementGUID, tagGUID); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /** - * Return the list of unique identifiers for elements that are linked to a specific tag either directly, or via one - * of its schema elements. - * - * @param serverName name of the server instances for this request - * @param tagGUID unique identifier of tag. - * @param startFrom index of the list to start from (0 for start) - * @param pageSize maximum number of elements to return. - * - * @return element guid list or - * InvalidParameterException the userId is null or invalid or - * PropertyServerException there is a problem retrieving information from the property server(s) or - * UserNotAuthorizedException the requesting user is not authorized to issue this request. - */ - public GUIDListResponse getElementsByTag(String serverName, - String tagGUID, - int startFrom, - int pageSize) - { - final String methodName = "getElementsByTag"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - GUIDListResponse response = new GUIDListResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setGUIDs(handler.getElementsByTag(userId, tagGUID, startFrom, pageSize)); - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - return response; - } - - - /* ===================================================================================================================== - * A note log maintains an ordered list of notes. It can be used to support release note, blogs and similar - * broadcast information. Notelogs are typically maintained by the owners/stewards of an element. - */ - - - /** - * Retrieve the list of note log metadata elements that contain the search string. - * The search string is treated as a regular expression. - * - * @param serverName name of the server to route the request to - * @param startFrom paging start point - * @param pageSize maximum results that can be returned - * @param startsWith does the value start with the supplied string? - * @param endsWith does the value end with the supplied string? - * @param ignoreCase should the search ignore case? - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody string to find in the properties - * - * @return list of matching metadata elements or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) - */ - public NoteLogElementsResponse findNoteLogs(String serverName, - int startFrom, - int pageSize, - boolean startsWith, - boolean endsWith, - boolean ignoreCase, - boolean forLineage, - boolean forDuplicateProcessing, - SearchStringRequestBody requestBody) - { - final String methodName = "findNoteLogs"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - NoteLogElementsResponse response = new NoteLogElementsResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - - if (requestBody != null) - { - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - response.setElementList(handler.findNoteLogs(userId, - instanceHandler.getSearchString(requestBody.getSearchString(), startsWith, endsWith, ignoreCase), - startFrom, - pageSize, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); - } - else - { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, SearchStringRequestBody.class.getName()); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - /** - * Retrieve the list of note log metadata elements with a matching qualified or display name. - * There are no wildcards supported on this request. + * Return the list of tags exactly matching the supplied name. * - * @param serverName name of the server instances for this request - * @param startFrom paging start point - * @param pageSize maximum results that can be returned - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody name to search for and correlators + * @param serverName name of the server instances for this request + * @param requestBody name of tag. + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. * - * @return list of matching metadata elements or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) + * @return tag list or + * InvalidParameterException - one of the parameters is invalid or + * PropertyServerException - there is a problem retrieving information from the property server(s) or + * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public NoteLogElementsResponse getNoteLogsByName(String serverName, - int startFrom, - int pageSize, - boolean forLineage, - boolean forDuplicateProcessing, - NameRequestBody requestBody) + public InformalTagsResponse getTagsByName(String serverName, + NameRequestBody requestBody, + int startFrom, + int pageSize) { - final String methodName = "getNoteLogsByName"; + final String methodName = "getTagsByName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - NoteLogElementsResponse response = new NoteLogElementsResponse(); - AuditLog auditLog = null; + InformalTagsResponse response = new InformalTagsResponse(); + AuditLog auditLog = null; try { @@ -3092,23 +1599,20 @@ public NoteLogElementsResponse getNoteLogsByName(String serverName, restCallLogger.setUserId(token, userId); + CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); if (requestBody != null) { - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - response.setElementList(handler.getNoteLogsByName(userId, - requestBody.getName(), - startFrom, - pageSize, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); + response.setTags(handler.getTagsByName(userId, + requestBody.getName(), + startFrom, + pageSize)); } else { - restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, NameRequestBody.class.getName()); + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); } } catch (Exception error) @@ -3117,42 +1621,34 @@ public NoteLogElementsResponse getNoteLogsByName(String serverName, } restCallLogger.logRESTCallReturn(token, response.toString()); - return response; } - /** - * Retrieve the list of note log metadata elements attached to the element. + * Return the list of the calling user's private tags exactly matching the supplied name. * - * @param serverName name of the server instances for this request - * @param elementGUID unique identifier of the note log of interest - * @param startFrom paging start point - * @param pageSize maximum results that can be returned - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody asset manager identifiers + * @param serverName name of the server instances for this request + * @param requestBody name of tag. + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. * - * @return list of associated metadata elements or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) + * @return tag list or + * InvalidParameterException - one of the parameters is invalid or + * PropertyServerException - there is a problem retrieving information from the property server(s) or + * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public NoteLogElementsResponse getNoteLogsForElement(String serverName, - String elementGUID, - int startFrom, - int pageSize, - boolean forLineage, - boolean forDuplicateProcessing, - EffectiveTimeQueryRequestBody requestBody) + public InformalTagsResponse getMyTagsByName(String serverName, + NameRequestBody requestBody, + int startFrom, + int pageSize) { - final String methodName = "getNotesForNoteLog"; + final String methodName = "getMyTagsByName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - NoteLogElementsResponse response = new NoteLogElementsResponse(); - AuditLog auditLog = null; + InformalTagsResponse response = new InformalTagsResponse(); + AuditLog auditLog = null; try { @@ -3160,94 +1656,20 @@ public NoteLogElementsResponse getNoteLogsForElement(String restCallLogger.setUserId(token, userId); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - if (requestBody != null) - { - response.setElementList(handler.getNoteLogsForElement(userId, - elementGUID, - startFrom, - pageSize, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); - } - else - { - response.setElementList(handler.getNoteLogsForElement(userId, - elementGUID, - startFrom, - pageSize, - null, - forLineage, - forDuplicateProcessing)); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - - /** - * Retrieve the note log metadata element with the supplied unique identifier. - * - * @param serverName name of the server instances for this request - * @param noteLogGUID unique identifier of the requested metadata element - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody correlators - * - * @return requested metadata element or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) - */ - public NoteLogElementResponse getNoteLogByGUID(String serverName, - String noteLogGUID, - boolean forLineage, - boolean forDuplicateProcessing, - EffectiveTimeQueryRequestBody requestBody) - { - final String methodName = "getNoteLogByGUID"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - NoteLogElementResponse response = new NoteLogElementResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); if (requestBody != null) { - response.setElement(handler.getNoteLogByGUID(userId, - noteLogGUID, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); + response.setTags(handler.getMyTagsByName(userId, + requestBody.getName(), + startFrom, + pageSize)); } else { - response.setElement(handler.getNoteLogByGUID(userId, - noteLogGUID, - null, - forLineage, - forDuplicateProcessing)); + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, NameRequestBody.class.getName()); } } catch (Exception error) @@ -3256,18 +1678,12 @@ public NoteLogElementResponse getNoteLogByGUID(String ser } restCallLogger.logRESTCallReturn(token, response.toString()); - return response; } - /* =============================================================================== - * A note log typically contains many notes, linked with relationships. - */ - /** - * Retrieve the list of note metadata elements that contain the search string. - * The search string is treated as a regular expression. + * Return the list of tags containing the supplied string in either the name or description. * * @param serverName name of the server to route the request to * @param startFrom paging start point @@ -3275,31 +1691,27 @@ public NoteLogElementResponse getNoteLogByGUID(String ser * @param startsWith does the value start with the supplied string? * @param endsWith does the value end with the supplied string? * @param ignoreCase should the search ignore case? - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? * @param requestBody string to find in the properties * - * @return list of matching metadata elements or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) + * @return tag list or + * InvalidParameterException - one of the parameters is invalid or + * PropertyServerException - there is a problem retrieving information from the property server(s) or + * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public NoteElementsResponse findNotes(String serverName, - int startFrom, - int pageSize, - boolean startsWith, - boolean endsWith, - boolean ignoreCase, - boolean forLineage, - boolean forDuplicateProcessing, - SearchStringRequestBody requestBody) + public InformalTagsResponse findTags(String serverName, + int startFrom, + int pageSize, + boolean startsWith, + boolean endsWith, + boolean ignoreCase, + SearchStringRequestBody requestBody) { - final String methodName = "findNotes"; + final String methodName = "findTags"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - NoteElementsResponse response = new NoteElementsResponse(); - AuditLog auditLog = null; + InformalTagsResponse response = new InformalTagsResponse(); + AuditLog auditLog = null; try { @@ -3307,19 +1719,16 @@ public NoteElementsResponse findNotes(String serverName, restCallLogger.setUserId(token, userId); + CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); if (requestBody != null) { - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - - response.setElementList(handler.findNotes(userId, - instanceHandler.getSearchString(requestBody.getSearchString(), startsWith, endsWith, ignoreCase), - startFrom, - pageSize, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); + response.setTags(handler.findTags(userId, + instanceHandler.getSearchString(requestBody.getSearchString(), startsWith, endsWith, ignoreCase), + startFrom, + pageSize)); } else { @@ -3332,40 +1741,39 @@ public NoteElementsResponse findNotes(String serverName, } restCallLogger.logRESTCallReturn(token, response.toString()); - return response; } /** - * Retrieve the list of notes associated with a note log. + * Return the list of the calling user's private tags containing the supplied string in either the name or description. * - * @param serverName name of the server instances for this request - * @param noteLogGUID unique identifier of the note log of interest + * @param serverName name of the server to route the request to * @param startFrom paging start point * @param pageSize maximum results that can be returned - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody asset manager identifiers + * @param startsWith does the value start with the supplied string? + * @param endsWith does the value end with the supplied string? + * @param ignoreCase should the search ignore case? + * @param requestBody string to find in the properties * - * @return list of associated metadata elements or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) + * @return tag list or + * InvalidParameterException - one of the parameters is invalid or + * PropertyServerException - there is a problem retrieving information from the property server(s) or + * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public NoteElementsResponse getNotesForNoteLog(String serverName, - String noteLogGUID, - int startFrom, - int pageSize, - boolean forLineage, - boolean forDuplicateProcessing, - EffectiveTimeQueryRequestBody requestBody) + public InformalTagsResponse findMyTags(String serverName, + int startFrom, + int pageSize, + boolean startsWith, + boolean endsWith, + boolean ignoreCase, + SearchStringRequestBody requestBody) { - final String methodName = "getNotesForNoteLog"; + final String methodName = "findMyTags"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - NoteElementsResponse response = new NoteElementsResponse(); + InformalTagsResponse response = new InformalTagsResponse(); AuditLog auditLog = null; try @@ -3374,94 +1782,21 @@ public NoteElementsResponse getNotesForNoteLog(String ser restCallLogger.setUserId(token, userId); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); - if (requestBody != null) - { - response.setElementList(handler.getNotesForNoteLog(userId, - noteLogGUID, - startFrom, - pageSize, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); - } - else - { - response.setElementList(handler.getNotesForNoteLog(userId, - noteLogGUID, - startFrom, - pageSize, - null, - forLineage, - forDuplicateProcessing)); - } - } - catch (Exception error) - { - restExceptionHandler.captureExceptions(response, error, methodName, auditLog); - } - - restCallLogger.logRESTCallReturn(token, response.toString()); - - return response; - } - - - /** - * Retrieve the note metadata element with the supplied unique identifier. - * - * @param serverName name of the server instances for this request - * @param noteGUID unique identifier of the requested metadata element - * @param forLineage return elements marked with the Memento classification? - * @param forDuplicateProcessing do not merge elements marked as duplicates? - * @param requestBody asset manager identifiers - * - * @return matching metadata element or - * InvalidParameterException one of the parameters is invalid - * UserNotAuthorizedException the user is not authorized to issue this request - * PropertyServerException there is a problem reported in the open metadata server(s) - */ - public NoteElementResponse getNoteByGUID(String serverName, - String noteGUID, - boolean forLineage, - boolean forDuplicateProcessing, - EffectiveTimeQueryRequestBody requestBody) - { - final String methodName = "getNoteByGUID"; - - RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - - NoteElementResponse response = new NoteElementResponse(); - AuditLog auditLog = null; - - try - { - String userId = super.getUser(instanceHandler.getServiceName(), methodName); - - restCallLogger.setUserId(token, userId); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - CollaborationManagementClient handler = instanceHandler.getCollaborationManagementClient(userId, serverName, methodName); if (requestBody != null) { - - response.setElement(handler.getNoteByGUID(userId, - noteGUID, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); + response.setTags(handler.findMyTags(userId, + instanceHandler.getSearchString(requestBody.getSearchString(), startsWith, endsWith, ignoreCase), + startFrom, + pageSize)); } else { - response.setElement(handler.getNoteByGUID(userId, - noteGUID, - null, - forLineage, - forDuplicateProcessing)); } + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName, SearchStringRequestBody.class.getName()); + } } catch (Exception error) { @@ -3469,7 +1804,6 @@ public NoteElementResponse getNoteByGUID(String serverNam } restCallLogger.logRESTCallReturn(token, response.toString()); - return response; } diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryViewController.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryViewController.java deleted file mode 100644 index f5448b5ac47..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryViewController.java +++ /dev/null @@ -1,1415 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossarybrowser.server.spring; - -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryCategoryElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetmanager.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.RelatedMetadataElementSummariesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -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.governanceaction.properties.AttachedClassification; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; -import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedMetadataElementSummary; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworkservices.gaf.rest.OpenMetadataElementResponse; -import org.odpi.openmetadata.viewservices.glossarybrowser.rest.GlossarySearchStringRequestBody; -import org.odpi.openmetadata.viewservices.glossarybrowser.server.GlossaryBrowserRESTServices; -import org.odpi.openmetadata.viewservices.glossarybrowser.server.spring.beans.*; -import org.springframework.web.bind.annotation.*; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * This controller serves all requests for glossaries, categories and terms. The API originated in the Egeria UI Application. It is a - * temporary interface until the UI components are updated to call the main Glossary Browser OMVS. - */ -@RestController -@RequestMapping("/servers/{serverName}/api/open-metadata/glossary-browser/old/glossaries") - -@Tag(name="API: Glossary Browser OMVS", - description="Explore the contents of a glossary, such as its top-level glossary element, glossary categories and glossary terms, along with the elements that are linked to the terms, such assets. Each operation includes optional forLineage and forDuplicateProcessing request parameters and an optional request body that includes an effective time field. These affect the elements that are returned on the query.", - externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/services/omvs/glossary-browser/overview/")) - -@Deprecated -public class GlossaryViewController -{ - private final RESTExceptionHandler exceptionHandler = new RESTExceptionHandler(); - - private final GlossaryBrowserRESTServices restAPI = new GlossaryBrowserRESTServices(); - - /** - * Retrieve the list of all glossaries. - * - * @param serverName name of the server to route the request to - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping - public List getAllGlossaries(@PathVariable String serverName, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getAllGlossaries"; - - SearchStringRequestBody requestBody = new SearchStringRequestBody(); - - GlossaryElementsResponse restResult = restAPI.findGlossaries(serverName, - from, - size, - false, - false, - true, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaries(restResult.getElementList()); - } - - - /** - * Retrieve the list of all glossary terms from all glossaries. - * - * @param serverName name of the server to route the request to - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms") - public List getAllGlossaryTerms(@PathVariable String serverName, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getAllGlossaryTerms"; - - GlossarySearchStringRequestBody requestBody = new GlossarySearchStringRequestBody(); - - GlossaryTermElementsResponse restResult = restAPI.findGlossaryTerms(serverName, - from, - size, - false, - false, - true, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * Retrieve the list of all categories from all glossaries. - * - * @param serverName name of the server to route the request to - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/categories") - public List getAllGlossaryCategories(@PathVariable String serverName, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException - { - final String methodName = "getAllGlossaryCategories"; - - GlossarySearchStringRequestBody requestBody = new GlossarySearchStringRequestBody(); - - GlossaryCategoryElementsResponse restResult = restAPI.findGlossaryCategories(serverName, - from, - size, - false, - false, - true, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryCategories(restResult.getElementList()); - } - - - /** - * Retrieve a specific glossary. - * - * @param serverName name of the server to route the request to - * @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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/{glossaryGUID}") - public Glossary getGlossary(@PathVariable String serverName, - @PathVariable("glossaryGUID") String glossaryGUID) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getGlossary"; - - GlossaryElementResponse restResult = restAPI.getGlossaryByGUID(serverName, - glossaryGUID, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossary(restResult.getElement()); - } - - - /** - * Retrieve all the categories from a specific glossary. - * - * @param serverName name of the server to route the request to - * @param glossaryGUID GUID of the glossary - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/{glossaryGUID}/categories") - public List getCategories(@PathVariable String serverName, - @PathVariable("glossaryGUID") String glossaryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getCategories"; - - GlossaryCategoryElementsResponse restResult = restAPI.getCategoriesForGlossary(serverName, - glossaryGUID, - from, - size, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryCategories(restResult.getElementList()); - } - - - /** - * Retrieve all the terms from a specific glossary. - * - * @param serverName name of the server to route the request to - * @param glossaryGUID GUID of the glossary - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - * */ - @GetMapping("/{glossaryGUID}/terms") - public List getTermsOfGlossary(@PathVariable String serverName, - @PathVariable("glossaryGUID") String glossaryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getTermsOfGlossary"; - - GlossaryTermElementsResponse restResult = restAPI.getTermsForGlossary(serverName, - glossaryGUID, - from, - size, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * Return the external links for a glossary. - * - * @param serverName name of the server to route the request to - * @param glossaryGUID GUID of the glossary - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - * */ - @GetMapping("/{glossaryGUID}/externalGlossaryLinks") - - public List getExternalGlossaryLinksOfGlossary(@PathVariable String serverName, - @PathVariable("glossaryGUID") String glossaryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - // todo - return null; - } - - - /** - * Return the antonym relationships. - * - * @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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}") - public GlossaryTerm getTerm(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getTerm"; - - GlossaryTermElementResponse restResult = restAPI.getGlossaryTermByGUID(serverName, - termGUID, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerm(restResult.getElement()); - } - - - /** - * Return the terms linked by the Antonym relationship. - * - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/antonyms") - public List getAntonyms(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getAntonyms"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.ANTONYM_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/assignedElements") - public List getAssignedElements(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getAssignedElements"; - - RelatedMetadataElementSummariesResponse restResult = restAPI.getSemanticAssignees(serverName, - termGUID, - from, - size, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - if ((restResult != null) && (restResult.getElements() != null)) - { - List results = new ArrayList<>(); - - for (RelatedMetadataElementSummary relatedElement : restResult.getElements()) - { - OpenMetadataElementResponse openMetadataElement = restAPI.getMetadataElementByGUID(serverName, - relatedElement.getRelatedElement().getElementHeader().getGUID(), - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - if (openMetadataElement.getElement() != null) - { - results.add(convertOpenMetadataElement(openMetadataElement.getElement())); - } - } - - return results; - } - - return null; - } - - - - /** - * Return glossary terms for the HASA relationship. - * - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/attributes") - public List getAttributes(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getAttributes"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.TERM_HAS_A_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/isA") - - public List getIsATerms(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getIsATerms"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.ISA_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/preferredTerms") - public List getPreferredTerms(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getPreferredTerms"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.PREFERRED_TERM_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/relatedTerms") - public List getRelatedTerms(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getRelatedTerms"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.RELATED_TERM_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/replacementTerms") - public List getReplacementTerms(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getReplacementTerms"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.REPLACEMENT_TERM_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/subtypes") - public List getSubtypes(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getSubtypes"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.TERM_IS_A_TYPE_OF_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/synonyms") - public List getSynonyms(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getSynonyms"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.SYNONYM_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/terms/{termGUID}/translations") - public List getTranslations(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getTranslations"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.TRANSLATION_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - * */ - @GetMapping("/terms/{termGUID}/types") - public List getTypedBys(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getTypedBys"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.TERM_TYPED_BY_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - * */ - @GetMapping("/terms/{termGUID}/usedInContext") - public List getUsedInContexts(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getUsedInContexts"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.USED_IN_CONTEXT_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - * */ - @GetMapping("/terms/{termGUID}/validValues") - public List getValidValues(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getValidValues"; - - GlossaryTermRelationshipRequestBody requestBody = new GlossaryTermRelationshipRequestBody(); - - requestBody.setRelationshipTypeName(OpenMetadataType.VALID_VALUE_RELATIONSHIP_NAME); - - GlossaryTermElementsResponse restResult = restAPI.getRelatedTerms(serverName, - termGUID, - from, - size, - false, - false, - requestBody); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param serverName name of the server to route the request to - * @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 UserNotAuthorizedException if a problem occurs on the omas backend - * */ - @GetMapping("/terms/{termGUID}/homeGlossary") - public Glossary getTermHomeGlossary(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getTermHomeGlossary"; - - GlossaryElementResponse restResult = restAPI.getGlossaryForTerm(serverName, - termGUID, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossary(restResult.getElement()); - - } - - - /** - * @param serverName name of the server to route the request to - * @param termGUID GUID of the term - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - * @return list of term's external glossary links - */ - @GetMapping("/terms/{termGUID}/externalGlossaryLinks") - public List getExternalGlossaryLinksOfTerm(@PathVariable String serverName, - @PathVariable("termGUID") String termGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - return null; - } - - - /** - * @param serverName name of the server to route the request to - * @param categoryGUID GUID of the category to be retrieved - * @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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}") - public GlossaryCategory getCategory(@PathVariable String serverName, - @PathVariable("categoryGUID") String categoryGUID) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getCategory"; - - GlossaryCategoryElementResponse restResult = restAPI.getGlossaryCategoryByGUID(serverName, - categoryGUID, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryCategory(restResult.getElement()); - } - - - /** - * @param serverName name of the server to route the request to - * @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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}/homeGlossary") - public Glossary getCategoryHomeGlossary(@PathVariable String serverName, - @PathVariable("categoryGUID") String categoryGUID) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getCategoryHomeGlossary"; - - GlossaryElementResponse restResult = restAPI.getGlossaryForCategory(serverName, - categoryGUID, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossary(restResult.getElement()); - } - - - /** - * @param serverName name of the server to route the request to - * @param categoryGUID GUID of the category - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}/subcategories") - public List getSubcategories(@PathVariable String serverName, - @PathVariable("categoryGUID") String categoryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getSubcategories"; - - GlossaryCategoryElementsResponse restResult = restAPI.getGlossarySubCategories(serverName, - categoryGUID, - from, - size, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryCategories(restResult.getElementList()); - } - - - /** - * @param serverName name of the server to route the request to - * @param categoryGUID GUID of the category - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}/terms") - public List getTermsOfCategory(@PathVariable String serverName, - @PathVariable("categoryGUID") String categoryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - final String methodName = "getTermsOfCategory"; - - GlossaryTermElementsResponse restResult = restAPI.getTermsForGlossaryCategory(serverName, - categoryGUID, - from, - size, - false, - false, - null); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return this.convertGlossaryTerms(restResult.getElementList()); - } - - - /** - * @param serverName name of the server to route the request to - * @param categoryGUID GUID of the category - * @param from the starting index, 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 UserNotAuthorizedException if a problem occurs on the omas backend - */ - @GetMapping("/categories/{categoryGUID}/externalGlossaryLinks") - - public List getExternalGlossaryLinks(@PathVariable String serverName, - @PathVariable("categoryGUID") String categoryGUID, - @RequestParam(defaultValue = "0") Integer from, - @RequestParam(defaultValue = "100") Integer size) throws UserNotAuthorizedException, - InvalidParameterException, - PropertyServerException - { - return null; - } - - - /** - * Convert the list of open metadata glossaries to the output for this controller. - * - * @param openMetadataGlossaryElements open metadata glossary elements - * @return converted elements - */ - private List convertGlossaries(List openMetadataGlossaryElements) - { - if (openMetadataGlossaryElements != null) - { - List results = new ArrayList<>(); - - for (GlossaryElement openMetadataGlossaryElement : openMetadataGlossaryElements) - { - results.add(this.convertGlossary(openMetadataGlossaryElement)); - } - - if (! results.isEmpty()) - { - return results; - } - } - - return null; - } - - - /** - * Convert the open metadata glossary to the output for this controller. - * - * @param openMetadataGlossaryElement open metadata glossary elements - * @return converted element - */ - private Glossary convertGlossary(GlossaryElement openMetadataGlossaryElement) - { - if (openMetadataGlossaryElement != null) - { - Glossary glossary = new Glossary(); - - glossary.setGuid(openMetadataGlossaryElement.getElementHeader().getGUID()); - glossary.setTypeDefName(openMetadataGlossaryElement.getElementHeader().getType().getTypeName()); - glossary.setVersion(openMetadataGlossaryElement.getElementHeader().getVersions().getVersion()); - glossary.setCreatedBy(openMetadataGlossaryElement.getElementHeader().getVersions().getCreatedBy()); - glossary.setCreateTime(openMetadataGlossaryElement.getElementHeader().getVersions().getCreateTime()); - glossary.setUpdatedBy(openMetadataGlossaryElement.getElementHeader().getVersions().getUpdatedBy()); - glossary.setUpdateTime(openMetadataGlossaryElement.getElementHeader().getVersions().getUpdateTime()); - glossary.setStatus(openMetadataGlossaryElement.getElementHeader().getStatus().getName()); - glossary.setEffectiveFromTime(openMetadataGlossaryElement.getGlossaryProperties().getEffectiveFrom()); - glossary.setEffectiveToTime(openMetadataGlossaryElement.getGlossaryProperties().getEffectiveTo()); - glossary.setClassifications(this.convertClassifications(openMetadataGlossaryElement.getElementHeader().getClassifications())); - - Map properties = new HashMap<>(); - - properties.put(OpenMetadataProperty.QUALIFIED_NAME.name, openMetadataGlossaryElement.getGlossaryProperties().getQualifiedName()); - properties.put(OpenMetadataProperty.DISPLAY_NAME.name, openMetadataGlossaryElement.getGlossaryProperties().getDisplayName()); - properties.put(OpenMetadataProperty.DESCRIPTION.name, openMetadataGlossaryElement.getGlossaryProperties().getDescription()); - properties.put(OpenMetadataType.LANGUAGE_PROPERTY_NAME, openMetadataGlossaryElement.getGlossaryProperties().getLanguage()); - properties.put(OpenMetadataProperty.USAGE.name, openMetadataGlossaryElement.getGlossaryProperties().getUsage()); - - if (openMetadataGlossaryElement.getGlossaryProperties().getExtendedProperties() != null) - { - for (String propertyName : openMetadataGlossaryElement.getGlossaryProperties().getExtendedProperties().keySet()) - { - if (openMetadataGlossaryElement.getGlossaryProperties().getExtendedProperties().get(propertyName) != null) - { - properties.put(propertyName, openMetadataGlossaryElement.getGlossaryProperties().getExtendedProperties().get(propertyName).toString()); - } - else - { - properties.put(propertyName, null); - } - } - } - - glossary.setProperties(properties); - - return glossary; - } - - return null; - } - - - - /** - * Convert the list of open metadata glossary terms to the output for this controller. - * - * @param openMetadataGlossaryTermElements open metadata glossary term elements - * @return converted elements - */ - private List convertGlossaryTerms(List openMetadataGlossaryTermElements) - { - if (openMetadataGlossaryTermElements != null) - { - List results = new ArrayList<>(); - - for (GlossaryTermElement openMetadataGlossaryTermElement : openMetadataGlossaryTermElements) - { - results.add(this.convertGlossaryTerm(openMetadataGlossaryTermElement)); - } - - if (! results.isEmpty()) - { - return results; - } - } - - return null; - } - - - /** - * Convert the open metadata glossary term to the output for this controller. - * - * @param openMetadataGlossaryTermElement open metadata glossary term elements - * @return converted element - */ - private GlossaryTerm convertGlossaryTerm(GlossaryTermElement openMetadataGlossaryTermElement) - { - if (openMetadataGlossaryTermElement != null) - { - GlossaryTerm glossaryTerm = new GlossaryTerm(); - - glossaryTerm.setGuid(openMetadataGlossaryTermElement.getElementHeader().getGUID()); - glossaryTerm.setTypeDefName(openMetadataGlossaryTermElement.getElementHeader().getType().getTypeName()); - glossaryTerm.setVersion(openMetadataGlossaryTermElement.getElementHeader().getVersions().getVersion()); - glossaryTerm.setCreatedBy(openMetadataGlossaryTermElement.getElementHeader().getVersions().getCreatedBy()); - glossaryTerm.setCreateTime(openMetadataGlossaryTermElement.getElementHeader().getVersions().getCreateTime()); - glossaryTerm.setUpdatedBy(openMetadataGlossaryTermElement.getElementHeader().getVersions().getUpdatedBy()); - glossaryTerm.setUpdateTime(openMetadataGlossaryTermElement.getElementHeader().getVersions().getUpdateTime()); - glossaryTerm.setStatus(openMetadataGlossaryTermElement.getElementHeader().getStatus().getName()); - glossaryTerm.setEffectiveFromTime(openMetadataGlossaryTermElement.getGlossaryTermProperties().getEffectiveFrom()); - glossaryTerm.setEffectiveToTime(openMetadataGlossaryTermElement.getGlossaryTermProperties().getEffectiveTo()); - glossaryTerm.setClassifications(this.convertClassifications(openMetadataGlossaryTermElement.getElementHeader().getClassifications())); - - Map properties = new HashMap<>(); - - properties.put(OpenMetadataProperty.QUALIFIED_NAME.name, openMetadataGlossaryTermElement.getGlossaryTermProperties().getQualifiedName()); - properties.put(OpenMetadataProperty.DISPLAY_NAME.name, openMetadataGlossaryTermElement.getGlossaryTermProperties().getDisplayName()); - properties.put(OpenMetadataProperty.SUMMARY.name, openMetadataGlossaryTermElement.getGlossaryTermProperties().getSummary()); - properties.put(OpenMetadataProperty.DESCRIPTION.name, openMetadataGlossaryTermElement.getGlossaryTermProperties().getDescription()); - properties.put(OpenMetadataProperty.EXAMPLES.name, openMetadataGlossaryTermElement.getGlossaryTermProperties().getExamples()); - properties.put(OpenMetadataProperty.ABBREVIATION.name, openMetadataGlossaryTermElement.getGlossaryTermProperties().getUsage()); - properties.put(OpenMetadataProperty.USAGE.name, openMetadataGlossaryTermElement.getGlossaryTermProperties().getUsage()); - properties.put(OpenMetadataProperty.PUBLISH_VERSION_ID.name, openMetadataGlossaryTermElement.getGlossaryTermProperties().getPublishVersionIdentifier()); - - if (openMetadataGlossaryTermElement.getGlossaryTermProperties().getExtendedProperties() != null) - { - for (String propertyName : openMetadataGlossaryTermElement.getGlossaryTermProperties().getExtendedProperties().keySet()) - { - if (openMetadataGlossaryTermElement.getGlossaryTermProperties().getExtendedProperties().get(propertyName) != null) - { - properties.put(propertyName, openMetadataGlossaryTermElement.getGlossaryTermProperties().getExtendedProperties().get(propertyName).toString()); - } - else - { - properties.put(propertyName, null); - } - } - } - - glossaryTerm.setProperties(properties); - - return glossaryTerm; - } - - return null; - } - - - /** - * Convert the list of open metadata glossary categories to the output for this controller. - * - * @param openMetadataGlossaryCategoryElements open metadata glossary category elements - * @return converted elements - */ - private List convertGlossaryCategories(List openMetadataGlossaryCategoryElements) - { - if (openMetadataGlossaryCategoryElements != null) - { - List results = new ArrayList<>(); - - for (GlossaryCategoryElement openMetadataGlossaryCategoryElement : openMetadataGlossaryCategoryElements) - { - results.add(this.convertGlossaryCategory(openMetadataGlossaryCategoryElement)); - } - - if (! results.isEmpty()) - { - return results; - } - } - - return null; - } - - - /** - * Convert the open metadata glossary category to the output for this controller. - * - * @param openMetadataGlossaryCategoryElement open metadata glossary category elements - * @return converted element - */ - private GlossaryCategory convertGlossaryCategory(GlossaryCategoryElement openMetadataGlossaryCategoryElement) - { - if (openMetadataGlossaryCategoryElement != null) - { - GlossaryCategory glossaryCategory = new GlossaryCategory(); - - glossaryCategory.setGuid(openMetadataGlossaryCategoryElement.getElementHeader().getGUID()); - glossaryCategory.setTypeDefName(openMetadataGlossaryCategoryElement.getElementHeader().getType().getTypeName()); - glossaryCategory.setVersion(openMetadataGlossaryCategoryElement.getElementHeader().getVersions().getVersion()); - glossaryCategory.setCreatedBy(openMetadataGlossaryCategoryElement.getElementHeader().getVersions().getCreatedBy()); - glossaryCategory.setCreateTime(openMetadataGlossaryCategoryElement.getElementHeader().getVersions().getCreateTime()); - glossaryCategory.setUpdatedBy(openMetadataGlossaryCategoryElement.getElementHeader().getVersions().getUpdatedBy()); - glossaryCategory.setUpdateTime(openMetadataGlossaryCategoryElement.getElementHeader().getVersions().getUpdateTime()); - glossaryCategory.setStatus(openMetadataGlossaryCategoryElement.getElementHeader().getStatus().getName()); - glossaryCategory.setEffectiveFromTime(openMetadataGlossaryCategoryElement.getGlossaryCategoryProperties().getEffectiveFrom()); - glossaryCategory.setEffectiveToTime(openMetadataGlossaryCategoryElement.getGlossaryCategoryProperties().getEffectiveTo()); - glossaryCategory.setClassifications(this.convertClassifications(openMetadataGlossaryCategoryElement.getElementHeader().getClassifications())); - - Map properties = new HashMap<>(); - - properties.put(OpenMetadataProperty.QUALIFIED_NAME.name, openMetadataGlossaryCategoryElement.getGlossaryCategoryProperties().getQualifiedName()); - properties.put(OpenMetadataProperty.DISPLAY_NAME.name, openMetadataGlossaryCategoryElement.getGlossaryCategoryProperties().getDisplayName()); - properties.put(OpenMetadataProperty.DESCRIPTION.name, openMetadataGlossaryCategoryElement.getGlossaryCategoryProperties().getDescription()); - - if (openMetadataGlossaryCategoryElement.getGlossaryCategoryProperties().getExtendedProperties() != null) - { - for (String propertyName : openMetadataGlossaryCategoryElement.getGlossaryCategoryProperties().getExtendedProperties().keySet()) - { - if (openMetadataGlossaryCategoryElement.getGlossaryCategoryProperties().getExtendedProperties().get(propertyName) != null) - { - properties.put(propertyName, openMetadataGlossaryCategoryElement.getGlossaryCategoryProperties().getExtendedProperties().get(propertyName).toString()); - } - else - { - properties.put(propertyName, null); - } - } - } - - glossaryCategory.setProperties(properties); - - return glossaryCategory; - } - - return null; - } - - - - - /** - * Convert the list of open metadata classifications to the output for this controller. - * - * @param openMetadataClassifications open metadata classifications - * @return converted elements - */ - private List convertClassifications(List openMetadataClassifications) - { - if (openMetadataClassifications != null) - { - List results = new ArrayList<>(); - - for (ElementClassification openMetadataClassification : openMetadataClassifications) - { - GlossaryViewClassification glossaryViewClassification = new GlossaryViewClassification(); - - glossaryViewClassification.setClassificationType(openMetadataClassification.getClassificationName()); - glossaryViewClassification.setName(openMetadataClassification.getClassificationName()); - glossaryViewClassification.setCreatedBy(openMetadataClassification.getVersions().getCreatedBy()); - glossaryViewClassification.setCreateTime(openMetadataClassification.getVersions().getCreateTime()); - glossaryViewClassification.setUpdatedBy(openMetadataClassification.getVersions().getUpdatedBy()); - glossaryViewClassification.setUpdateTime(openMetadataClassification.getVersions().getUpdateTime()); - glossaryViewClassification.setStatus(openMetadataClassification.getStatus().getName()); - - if (openMetadataClassification.getClassificationProperties() != null) - { - Map properties = new HashMap<>(); - - for (String propertyName : openMetadataClassification.getClassificationProperties().keySet()) - { - if (openMetadataClassification.getClassificationProperties().get(propertyName) != null) - { - properties.put(propertyName, openMetadataClassification.getClassificationProperties().get(propertyName).toString()); - } - else - { - properties.put(propertyName, null); - } - } - - glossaryViewClassification.setProperties(properties); - } - } - - return results; - } - - return null; - } - - - /** - * Convert the open metadata glossary category to the output for this controller. - * - * @param openMetadataElement open metadata glossary category elements - * @return converted element - */ - private GlossaryViewEntityDetail convertOpenMetadataElement(OpenMetadataElement openMetadataElement) - { - if (openMetadataElement != null) - { - GlossaryViewEntityDetail glossaryViewEntityDetail = new GlossaryViewEntityDetail(); - - glossaryViewEntityDetail.setGuid(openMetadataElement.getElementGUID()); - glossaryViewEntityDetail.setTypeDefName(openMetadataElement.getType().getTypeName()); - glossaryViewEntityDetail.setVersion(openMetadataElement.getVersions().getVersion()); - glossaryViewEntityDetail.setCreatedBy(openMetadataElement.getVersions().getCreatedBy()); - glossaryViewEntityDetail.setCreateTime(openMetadataElement.getVersions().getCreateTime()); - glossaryViewEntityDetail.setUpdatedBy(openMetadataElement.getVersions().getUpdatedBy()); - glossaryViewEntityDetail.setUpdateTime(openMetadataElement.getVersions().getUpdateTime()); - glossaryViewEntityDetail.setStatus(openMetadataElement.getStatus().getName()); - glossaryViewEntityDetail.setEffectiveFromTime(openMetadataElement.getEffectiveFromTime()); - glossaryViewEntityDetail.setEffectiveToTime(openMetadataElement.getEffectiveToTime()); - glossaryViewEntityDetail.setClassifications(this.convertAttachedClassifications(openMetadataElement.getClassifications())); - - Map properties = new HashMap<>(); - - if (openMetadataElement.getElementProperties() != null) - { - for (String propertyName : openMetadataElement.getElementProperties().getPropertyValueMap().keySet()) - { - if (openMetadataElement.getElementProperties().getPropertyValue(propertyName) != null) - { - properties.put(propertyName, openMetadataElement.getElementProperties().getPropertyValue(propertyName).valueAsString()); - } - else - { - properties.put(propertyName, null); - } - } - } - - glossaryViewEntityDetail.setProperties(properties); - - return glossaryViewEntityDetail; - } - - return null; - } - - - - /** - * Convert the list of open metadata classifications to the output for this controller. - * - * @param openMetadataClassifications open metadata classifications - * @return converted elements - */ - private List convertAttachedClassifications(List openMetadataClassifications) - { - if (openMetadataClassifications != null) - { - List results = new ArrayList<>(); - - for (AttachedClassification openMetadataClassification : openMetadataClassifications) - { - GlossaryViewClassification glossaryViewClassification = new GlossaryViewClassification(); - - glossaryViewClassification.setClassificationType(openMetadataClassification.getClassificationName()); - glossaryViewClassification.setName(openMetadataClassification.getClassificationName()); - glossaryViewClassification.setCreatedBy(openMetadataClassification.getVersions().getCreatedBy()); - glossaryViewClassification.setCreateTime(openMetadataClassification.getVersions().getCreateTime()); - glossaryViewClassification.setUpdatedBy(openMetadataClassification.getVersions().getUpdatedBy()); - glossaryViewClassification.setUpdateTime(openMetadataClassification.getVersions().getUpdateTime()); - glossaryViewClassification.setStatus(openMetadataClassification.getStatus().getName()); - - if (openMetadataClassification.getClassificationProperties() != null) - { - glossaryViewClassification.setProperties(openMetadataClassification.getClassificationProperties().getPropertiesAsStrings()); - } - } - - return results; - } - - return null; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/ControlledGlossaryTerm.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/ControlledGlossaryTerm.java deleted file mode 100644 index 034e5e40a61..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/ControlledGlossaryTerm.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossarybrowser.server.spring.beans; - -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/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/ExternalGlossaryLink.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/ExternalGlossaryLink.java deleted file mode 100644 index a61767c7eec..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/ExternalGlossaryLink.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossarybrowser.server.spring.beans; - -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/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/Glossary.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/Glossary.java deleted file mode 100644 index 0128f28f62a..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/Glossary.java +++ /dev/null @@ -1,57 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossarybrowser.server.spring.beans; - -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/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryCategory.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryCategory.java deleted file mode 100644 index 9ba81beb5c9..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/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.viewservices.glossarybrowser.server.spring.beans; - -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/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryTerm.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryTerm.java deleted file mode 100644 index 636a10d4831..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryTerm.java +++ /dev/null @@ -1,83 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossarybrowser.server.spring.beans; - -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"; - private static final String PUBLISH_VERSION_ID = "publishVersionIdentifier"; - - - 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 String getPublishVersionIdentifier(){ - return getProperties().get(PUBLISH_VERSION_ID); - } - - 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); - } - public void setPublishVersionIdentifier(String usage) { - getProperties().put(PUBLISH_VERSION_ID, usage); - } -} diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewClassification.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewClassification.java deleted file mode 100644 index 8d590f1fa9d..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/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.viewservices.glossarybrowser.server.spring.beans; - -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/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewEntityDetail.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewEntityDetail.java deleted file mode 100644 index 788dfb8615f..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/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.viewservices.glossarybrowser.server.spring.beans; - -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.frameworks.openmetadata.types.OpenMetadataProperty; - -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 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(OpenMetadataProperty.QUALIFIED_NAME.name); - } - - public void setQualifiedName(String qualifiedName) - { - properties.put(OpenMetadataProperty.QUALIFIED_NAME.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/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewEntityDetailResponse.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewEntityDetailResponse.java deleted file mode 100644 index ab8af680e92..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/GlossaryViewEntityDetailResponse.java +++ /dev/null @@ -1,102 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.glossarybrowser.server.spring.beans; - -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 java.util.ArrayList; -import java.util.Arrays; -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; - -/** - * 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) -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; - } - - - @Override - public String toString() - { - return "GlossaryViewEntityDetailResponse{" + - "result=" + result + - ", actionDescription='" + actionDescription + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof GlossaryViewEntityDetailResponse that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(result, that.result) && Objects.equals(actionDescription, that.actionDescription); - } - - - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), result, actionDescription); - } -} diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/package-info.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/package-info.java deleted file mode 100644 index 77d051fd55e..00000000000 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/beans/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * These beans are used on the deprecated GlossaryViewController. They originate from the deprecated Glossary View OMAS. - */ -package org.odpi.openmetadata.viewservices.glossarybrowser.server.spring.beans; \ No newline at end of file diff --git a/open-metadata-resources/open-metadata-deployment/sample-configs/BuildSampleConfigs.http b/open-metadata-resources/open-metadata-deployment/sample-configs/BuildSampleConfigs.http index 4c4eed72c35..67ab9d262e1 100644 --- a/open-metadata-resources/open-metadata-deployment/sample-configs/BuildSampleConfigs.http +++ b/open-metadata-resources/open-metadata-deployment/sample-configs/BuildSampleConfigs.http @@ -75,6 +75,11 @@ Content-Type: application/json ### # Set up all of the registered, undeprecated Open Metadata Access Services (OMASs) with kafka notifications enabled. POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/active-metadata-store/access-services +Content-Type: application/json + +{ + "KarmaPointIncrement" : "1" +} ### # Add the file name for an open Metadata Archive that should be loaded each time the server starts. diff --git a/open-metadata-resources/open-metadata-deployment/sample-configs/active-metadata-store/config/active-metadata-store.config b/open-metadata-resources/open-metadata-deployment/sample-configs/active-metadata-store/config/active-metadata-store.config old mode 100644 new mode 100755 index ecbb01393f9..9fdecfa7139 --- a/open-metadata-resources/open-metadata-deployment/sample-configs/active-metadata-store/config/active-metadata-store.config +++ b/open-metadata-resources/open-metadata-deployment/sample-configs/active-metadata-store/config/active-metadata-store.config @@ -1 +1 @@ -{"class":"OMAGServerConfig","versionId":"V2.0","localServerId":"66e465e3-d838-4f32-8f80-3f76b0df583a","localServerName":"active-metadata-store","localServerDescription":"A metadata store that supports Open Metadata Access Services (OMASs) with event notifications. It provides metadata to view-server, engine-host and integration-daemon.","localServerURL":"{{egeriaEndpoint}}","localServerUserId":"activenpa","maxPageSize":1000,"eventBusConfig":{"class":"EventBusConfig","topicURLRoot":"egeria.omag","configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServicesConfig":[{"class":"AccessServiceConfig","accessServiceId":205,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.assetowner.admin.AssetOwnerAdmin","accessServiceName":"Asset Owner","accessServiceFullName":"Asset Owner OMAS","accessServiceURLMarker":"asset-owner","accessServiceDescription":"Manage an asset","accessServiceWiki":"https://egeria-project.org/services/omas/asset-owner/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.assetowner.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":210,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.datamanager.admin.DataManagerAdmin","accessServiceName":"Data Manager","accessServiceFullName":"Data Manager OMAS","accessServiceURLMarker":"data-manager","accessServiceDescription":"Capture changes to the data stores and data set managed by a data manager such as a database server, content manager or file system.","accessServiceWiki":"https://egeria-project.org/services/omas/data-manager/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.datamanager.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":225,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.stewardshipaction.admin.StewardshipActionAdmin","accessServiceName":"Stewardship Action","accessServiceFullName":"Stewardship Action OMAS","accessServiceURLMarker":"stewardship-action","accessServiceDescription":"Manage exceptions and actions from open governance.","accessServiceWiki":"https://egeria-project.org/services/omas/stewardship-action/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.stewardshipaction.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":220,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.governanceprogram.admin.GovernanceProgramAdmin","accessServiceName":"Governance Program","accessServiceFullName":"Governance Program OMAS","accessServiceURLMarker":"governance-program","accessServiceDescription":"Manage the governance program.","accessServiceWiki":"https://egeria-project.org/services/omas/governance-program/overview/","accessServiceOperationalStatus":"ENABLED"},{"class":"AccessServiceConfig","accessServiceId":216,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.digitalservice.admin.DigitalServiceAdmin","accessServiceName":"Digital Service","accessServiceFullName":"Digital Service OMAS","accessServiceURLMarker":"digital-service","accessServiceDescription":"Manage a digital service through its lifecycle.","accessServiceWiki":"https://egeria-project.org/services/omas/digital-service/overview/","accessServiceOperationalStatus":"ENABLED"},{"class":"AccessServiceConfig","accessServiceId":203,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.assetlineage.admin.AssetLineageAdmin","accessServiceName":"Asset Lineage","accessServiceFullName":"Asset Lineage OMAS","accessServiceURLMarker":"asset-lineage","accessServiceDescription":"Publish asset lineage","accessServiceWiki":"https://egeria-project.org/services/omas/asset-lineage/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.assetlineage.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":213,"accessServiceDevelopmentStatus":"IN_DEVELOPMENT","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.designmodel.admin.DesignModelAdmin","accessServiceName":"Design Model","accessServiceFullName":"Design Model OMAS","accessServiceURLMarker":"design-model","accessServiceDescription":"Exchange design model content with tools and standard packages.","accessServiceWiki":"https://egeria-project.org/services/omas/design-model/overview/","accessServiceOperationalStatus":"ENABLED"},{"class":"AccessServiceConfig","accessServiceId":204,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.assetmanager.admin.AssetManagerAdmin","accessServiceName":"Asset Manager","accessServiceFullName":"Asset Manager OMAS","accessServiceURLMarker":"asset-manager","accessServiceDescription":"Manage metadata from a third party asset manager","accessServiceWiki":"https://egeria-project.org/services/omas/asset-manager/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.assetmanager.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":201,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.assetconsumer.admin.AssetConsumerAdmin","accessServiceName":"Asset Consumer","accessServiceFullName":"Asset Consumer OMAS","accessServiceURLMarker":"asset-consumer","accessServiceDescription":"Access assets through connectors.","accessServiceWiki":"https://egeria-project.org/services/omas/asset-consumer/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.assetconsumer.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":208,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.itinfrastructure.admin.ITInfrastructureAdmin","accessServiceName":"IT Infrastructure","accessServiceFullName":"IT Infrastructure OMAS","accessServiceURLMarker":"it-infrastructure","accessServiceDescription":"Manage information about the deployed IT infrastructure.","accessServiceWiki":"https://egeria-project.org/services/omas/it-infrastructure/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.itinfrastructure.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":212,"accessServiceDevelopmentStatus":"IN_DEVELOPMENT","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.datascience.admin.DataScienceAdmin","accessServiceName":"Data Science","accessServiceFullName":"Data Science OMAS","accessServiceURLMarker":"data-science","accessServiceDescription":"Create and manage data science definitions and models.","accessServiceWiki":"https://egeria-project.org/services/omas/data-science/overview/","accessServiceOperationalStatus":"ENABLED"},{"class":"AccessServiceConfig","accessServiceId":207,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.communityprofile.admin.CommunityProfileAdmin","accessServiceName":"Community Profile","accessServiceFullName":"Community Profile OMAS","accessServiceURLMarker":"community-profile","accessServiceDescription":"Define personal profile and collaborate.","accessServiceWiki":"https://egeria-project.org/services/omas/community-profile/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.communityprofile.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":224,"accessServiceDevelopmentStatus":"IN_DEVELOPMENT","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.softwaredeveloper.admin.SoftwareDeveloperAdmin","accessServiceName":"Software Developer","accessServiceFullName":"Software Developer OMAS","accessServiceURLMarker":"software-developer","accessServiceDescription":"Interact with software development tools.","accessServiceWiki":"https://egeria-project.org/services/omas/software-developer/overview/","accessServiceOperationalStatus":"ENABLED"},{"class":"AccessServiceConfig","accessServiceId":221,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.projectmanagement.admin.ProjectManagementAdmin","accessServiceName":"Project Management","accessServiceFullName":"Project Management OMAS","accessServiceURLMarker":"project-management","accessServiceDescription":"Manage governance related projects.","accessServiceWiki":"https://egeria-project.org/services/omas/project-management/overview/","accessServiceOperationalStatus":"ENABLED"},{"class":"AccessServiceConfig","accessServiceId":219,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.governanceengine.admin.GovernanceEngineAdmin","accessServiceName":"Governance Engine","accessServiceFullName":"Governance Engine OMAS","accessServiceURLMarker":"governance-engine","accessServiceDescription":"Provide metadata services and watch dog notification to the governance action services.","accessServiceWiki":"https://egeria-project.org/services/omas/governance-engine/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.governanceengine.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":215,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.digitalarchitecture.admin.DigitalArchitectureAdmin","accessServiceName":"Digital Architecture","accessServiceFullName":"Digital Architecture OMAS","accessServiceURLMarker":"digital-architecture","accessServiceDescription":"Design of the digital services for an organization","accessServiceWiki":"https://egeria-project.org/services/omas/digital-architecture/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.digitalarchitecture.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":227,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.governanceserver.admin.GovernanceServerAdmin","accessServiceName":"Governance Server","accessServiceFullName":"Governance Server OMAS","accessServiceURLMarker":"governance-server","accessServiceDescription":"Supply the governance engine definitions to the engine hosts and the and integration group definitions to the integration daemons.","accessServiceWiki":"https://egeria-project.org/services/omas/governance-server/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.governanceserver.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}},{"class":"AccessServiceConfig","accessServiceId":222,"accessServiceDevelopmentStatus":"IN_DEVELOPMENT","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.securitymanager.admin.SecurityManagerAdmin","accessServiceName":"Security Manager","accessServiceFullName":"Security Manager OMAS","accessServiceURLMarker":"security-manager","accessServiceDescription":"Manages exchange of metadata with a security service.","accessServiceWiki":"https://egeria-project.org/services/omas/security-manager/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.securitymanager.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}}}],"repositoryServicesConfig":{"class":"RepositoryServicesConfig","auditLogConnections":[{"class":"Connection","headerVersion":0,"qualifiedName":"Console- default","displayName":"Console","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider"},"configurationProperties":{"supportedSeverities":["Unknown","Information","Decision","Action","Error","Exception","Security","Startup","Shutdown","Asset","Cohort"]}}],"openMetadataArchiveConnections":[{"class":"Connection","headerVersion":0,"displayName":"Open Metadata Archive File content-packs/CoreContentPack.omarchive Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.archiveconnector.file.FileBasedOpenMetadataArchiveStoreProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"content-packs/CoreContentPack.omarchive"}}],"localRepositoryConfig":{"class":"LocalRepositoryConfig","metadataCollectionId":"61400a70-8c49-4635-b221-a8b11872ae16","localRepositoryMode":"OPEN_METADATA_NATIVE","localRepositoryLocalConnection":{"class":"Connection","headerVersion":0,"displayName":"Local KV XTDB Repository","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.XTDBOMRSRepositoryConnectorProvider"},"configurationProperties":{"xtdbConfig":{"xtdb.lucene/lucene-store":{"db-dir":"data/servers/active-metadata-store/repository/xtdb-kv/lucene"},"xtdb/tx-log":{"kv-store":{"db-dir":"data/servers/active-metadata-store/repository/xtdb-kv/rdb-tx","xtdb/module":"xtdb.rocksdb/->kv-store"}},"xtdb/index-store":{"kv-store":{"db-dir":"data/servers/active-metadata-store/repository/xtdb-kv/rdb-index","xtdb/module":"xtdb.rocksdb/->kv-store"}},"xtdb/document-store":{"kv-store":{"db-dir":"data/servers/active-metadata-store/repository/xtdb-kv/rdb-docs","xtdb/module":"xtdb.rocksdb/->kv-store"}}}}},"localRepositoryRemoteConnection":{"class":"Connection","headerVersion":0,"displayName":"Local Repository Remote Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.rest.repositoryconnector.OMRSRESTRepositoryConnectorProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"{{egeriaEndpoint}}/servers/active-metadata-store"}},"eventsToSaveRule":"ALL","eventsToSendRule":"ALL"},"enterpriseAccessConfig":{"class":"EnterpriseAccessConfig","enterpriseMetadataCollectionName":"active-metadata-store Enterprise Metadata Collection","enterpriseMetadataCollectionId":"6a163ac0-b4e6-46b6-ad74-aaf8323ed69e","enterpriseOMRSTopicConnection":{"class":"VirtualConnection","headerVersion":0,"displayName":"Enterprise OMRS Topic Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicProvider"},"embeddedConnections":[{"class":"EmbeddedConnection","headerVersion":0,"position":0,"displayName":"Enterprise OMRS Events","embeddedConnection":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.inmemory.InMemoryOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"active-metadata-store.openmetadata.repositoryservices.enterprise.active-metadata-store.OMRSTopic"},"configurationProperties":{"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","eventDirection":"inOut"}}}]},"enterpriseOMRSTopicProtocolVersion":"V1"}},"auditTrail":["Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for local server's userId to activenpa.","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for local server's description to A metadata store that supports Open Metadata Access Services (OMASs) with event notifications. It provides metadata to view-server, engine-host and integration-daemon..","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for the local repository.","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for default event bus.","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for access services.","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for enterprise repository services (used by access services).","Tue Aug 27 15:47:52 BST 2024 garygeeke updated list of open metadata archives loaded at server start up."]} \ No newline at end of file +{"class":"OMAGServerConfig","versionId":"V2.0","localServerId":"66e465e3-d838-4f32-8f80-3f76b0df583a","localServerName":"active-metadata-store","localServerDescription":"A metadata store that supports Open Metadata Access Services (OMASs) with event notifications. It provides metadata to view-server, engine-host and integration-daemon.","localServerURL":"{{egeriaEndpoint}}","localServerUserId":"activenpa","maxPageSize":1000,"eventBusConfig":{"class":"EventBusConfig","topicURLRoot":"egeria.omag","configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServicesConfig":[{"class":"AccessServiceConfig","accessServiceId":205,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.assetowner.admin.AssetOwnerAdmin","accessServiceName":"Asset Owner","accessServiceFullName":"Asset Owner OMAS","accessServiceURLMarker":"asset-owner","accessServiceDescription":"Manage an asset","accessServiceWiki":"https://egeria-project.org/services/omas/asset-owner/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.assetowner.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":210,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.datamanager.admin.DataManagerAdmin","accessServiceName":"Data Manager","accessServiceFullName":"Data Manager OMAS","accessServiceURLMarker":"data-manager","accessServiceDescription":"Capture changes to the data stores and data set managed by a data manager such as a database server, content manager or file system.","accessServiceWiki":"https://egeria-project.org/services/omas/data-manager/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.datamanager.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":225,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.stewardshipaction.admin.StewardshipActionAdmin","accessServiceName":"Stewardship Action","accessServiceFullName":"Stewardship Action OMAS","accessServiceURLMarker":"stewardship-action","accessServiceDescription":"Manage exceptions and actions from open governance.","accessServiceWiki":"https://egeria-project.org/services/omas/stewardship-action/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.stewardshipaction.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":220,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.governanceprogram.admin.GovernanceProgramAdmin","accessServiceName":"Governance Program","accessServiceFullName":"Governance Program OMAS","accessServiceURLMarker":"governance-program","accessServiceDescription":"Manage the governance program.","accessServiceWiki":"https://egeria-project.org/services/omas/governance-program/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":216,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.digitalservice.admin.DigitalServiceAdmin","accessServiceName":"Digital Service","accessServiceFullName":"Digital Service OMAS","accessServiceURLMarker":"digital-service","accessServiceDescription":"Manage a digital service through its lifecycle.","accessServiceWiki":"https://egeria-project.org/services/omas/digital-service/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":203,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.assetlineage.admin.AssetLineageAdmin","accessServiceName":"Asset Lineage","accessServiceFullName":"Asset Lineage OMAS","accessServiceURLMarker":"asset-lineage","accessServiceDescription":"Publish asset lineage","accessServiceWiki":"https://egeria-project.org/services/omas/asset-lineage/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.assetlineage.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":213,"accessServiceDevelopmentStatus":"IN_DEVELOPMENT","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.designmodel.admin.DesignModelAdmin","accessServiceName":"Design Model","accessServiceFullName":"Design Model OMAS","accessServiceURLMarker":"design-model","accessServiceDescription":"Exchange design model content with tools and standard packages.","accessServiceWiki":"https://egeria-project.org/services/omas/design-model/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":204,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.assetmanager.admin.AssetManagerAdmin","accessServiceName":"Asset Manager","accessServiceFullName":"Asset Manager OMAS","accessServiceURLMarker":"asset-manager","accessServiceDescription":"Manage metadata from a third party asset manager","accessServiceWiki":"https://egeria-project.org/services/omas/asset-manager/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.assetmanager.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":201,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.assetconsumer.admin.AssetConsumerAdmin","accessServiceName":"Asset Consumer","accessServiceFullName":"Asset Consumer OMAS","accessServiceURLMarker":"asset-consumer","accessServiceDescription":"Access assets through connectors.","accessServiceWiki":"https://egeria-project.org/services/omas/asset-consumer/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.assetconsumer.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":208,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.itinfrastructure.admin.ITInfrastructureAdmin","accessServiceName":"IT Infrastructure","accessServiceFullName":"IT Infrastructure OMAS","accessServiceURLMarker":"it-infrastructure","accessServiceDescription":"Manage information about the deployed IT infrastructure.","accessServiceWiki":"https://egeria-project.org/services/omas/it-infrastructure/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.itinfrastructure.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":212,"accessServiceDevelopmentStatus":"IN_DEVELOPMENT","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.datascience.admin.DataScienceAdmin","accessServiceName":"Data Science","accessServiceFullName":"Data Science OMAS","accessServiceURLMarker":"data-science","accessServiceDescription":"Create and manage data science definitions and models.","accessServiceWiki":"https://egeria-project.org/services/omas/data-science/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":207,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.communityprofile.admin.CommunityProfileAdmin","accessServiceName":"Community Profile","accessServiceFullName":"Community Profile OMAS","accessServiceURLMarker":"community-profile","accessServiceDescription":"Define personal profile and collaborate.","accessServiceWiki":"https://egeria-project.org/services/omas/community-profile/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.communityprofile.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":224,"accessServiceDevelopmentStatus":"IN_DEVELOPMENT","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.softwaredeveloper.admin.SoftwareDeveloperAdmin","accessServiceName":"Software Developer","accessServiceFullName":"Software Developer OMAS","accessServiceURLMarker":"software-developer","accessServiceDescription":"Interact with software development tools.","accessServiceWiki":"https://egeria-project.org/services/omas/software-developer/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":221,"accessServiceDevelopmentStatus":"TECHNICAL_PREVIEW","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.projectmanagement.admin.ProjectManagementAdmin","accessServiceName":"Project Management","accessServiceFullName":"Project Management OMAS","accessServiceURLMarker":"project-management","accessServiceDescription":"Manage governance related projects.","accessServiceWiki":"https://egeria-project.org/services/omas/project-management/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":219,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.governanceengine.admin.GovernanceEngineAdmin","accessServiceName":"Governance Engine","accessServiceFullName":"Governance Engine OMAS","accessServiceURLMarker":"governance-engine","accessServiceDescription":"Provide metadata services and watch dog notification to the governance action services.","accessServiceWiki":"https://egeria-project.org/services/omas/governance-engine/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.governanceengine.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":215,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.digitalarchitecture.admin.DigitalArchitectureAdmin","accessServiceName":"Digital Architecture","accessServiceFullName":"Digital Architecture OMAS","accessServiceURLMarker":"digital-architecture","accessServiceDescription":"Design of the digital services for an organization","accessServiceWiki":"https://egeria-project.org/services/omas/digital-architecture/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.digitalarchitecture.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":227,"accessServiceDevelopmentStatus":"STABLE","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.governanceserver.admin.GovernanceServerAdmin","accessServiceName":"Governance Server","accessServiceFullName":"Governance Server OMAS","accessServiceURLMarker":"governance-server","accessServiceDescription":"Supply the governance engine definitions to the engine hosts and the and integration group definitions to the integration daemons.","accessServiceWiki":"https://egeria-project.org/services/omas/governance-server/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.governanceserver.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}},{"class":"AccessServiceConfig","accessServiceId":222,"accessServiceDevelopmentStatus":"IN_DEVELOPMENT","accessServiceAdminClass":"org.odpi.openmetadata.accessservices.securitymanager.admin.SecurityManagerAdmin","accessServiceName":"Security Manager","accessServiceFullName":"Security Manager OMAS","accessServiceURLMarker":"security-manager","accessServiceDescription":"Manages exchange of metadata with a security service.","accessServiceWiki":"https://egeria-project.org/services/omas/security-manager/overview/","accessServiceOperationalStatus":"ENABLED","accessServiceOutTopic":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"egeria.omag.server.active-metadata-store.omas.securitymanager.outTopic"},"configurationProperties":{"producer":{"bootstrap.servers":"{{kafkaEndpoint}}"},"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","consumer":{"bootstrap.servers":"{{kafkaEndpoint}}"}}},"accessServiceOptions":{"KarmaPointIncrement":"1"}}],"repositoryServicesConfig":{"class":"RepositoryServicesConfig","auditLogConnections":[{"class":"Connection","headerVersion":0,"qualifiedName":"Console- default","displayName":"Console","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider"},"configurationProperties":{"supportedSeverities":["Unknown","Information","Decision","Action","Error","Exception","Security","Startup","Shutdown","Asset","Cohort"]}}],"openMetadataArchiveConnections":[{"class":"Connection","headerVersion":0,"displayName":"Open Metadata Archive File content-packs/CoreContentPack.omarchive Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.archiveconnector.file.FileBasedOpenMetadataArchiveStoreProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"content-packs/CoreContentPack.omarchive"}}],"localRepositoryConfig":{"class":"LocalRepositoryConfig","metadataCollectionId":"61400a70-8c49-4635-b221-a8b11872ae16","localRepositoryMode":"OPEN_METADATA_NATIVE","localRepositoryLocalConnection":{"class":"Connection","headerVersion":0,"displayName":"Local KV XTDB Repository","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.XTDBOMRSRepositoryConnectorProvider"},"configurationProperties":{"xtdbConfig":{"xtdb.lucene/lucene-store":{"db-dir":"data/servers/active-metadata-store/repository/xtdb-kv/lucene"},"xtdb/tx-log":{"kv-store":{"db-dir":"data/servers/active-metadata-store/repository/xtdb-kv/rdb-tx","xtdb/module":"xtdb.rocksdb/->kv-store"}},"xtdb/index-store":{"kv-store":{"db-dir":"data/servers/active-metadata-store/repository/xtdb-kv/rdb-index","xtdb/module":"xtdb.rocksdb/->kv-store"}},"xtdb/document-store":{"kv-store":{"db-dir":"data/servers/active-metadata-store/repository/xtdb-kv/rdb-docs","xtdb/module":"xtdb.rocksdb/->kv-store"}}}}},"localRepositoryRemoteConnection":{"class":"Connection","headerVersion":0,"displayName":"Local Repository Remote Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.rest.repositoryconnector.OMRSRESTRepositoryConnectorProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"{{egeriaEndpoint}}/servers/active-metadata-store"}},"eventsToSaveRule":"ALL","eventsToSendRule":"ALL"},"enterpriseAccessConfig":{"class":"EnterpriseAccessConfig","enterpriseMetadataCollectionName":"active-metadata-store Enterprise Metadata Collection","enterpriseMetadataCollectionId":"53be8d67-649f-4a32-8d9f-3c162af442f4","enterpriseOMRSTopicConnection":{"class":"VirtualConnection","headerVersion":0,"displayName":"Enterprise OMRS Topic Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicProvider"},"embeddedConnections":[{"class":"EmbeddedConnection","headerVersion":0,"position":0,"displayName":"Enterprise OMRS Events","embeddedConnection":{"class":"Connection","headerVersion":0,"displayName":"Kafka Event Bus Connection","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.eventbus.topic.inmemory.InMemoryOpenMetadataTopicProvider"},"endpoint":{"class":"Endpoint","headerVersion":0,"address":"active-metadata-store.openmetadata.repositoryservices.enterprise.active-metadata-store.OMRSTopic"},"configurationProperties":{"local.server.id":"66e465e3-d838-4f32-8f80-3f76b0df583a","eventDirection":"inOut"}}}]},"enterpriseOMRSTopicProtocolVersion":"V1"}},"auditTrail":["Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for local server's userId to activenpa.","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for local server's description to A metadata store that supports Open Metadata Access Services (OMASs) with event notifications. It provides metadata to view-server, engine-host and integration-daemon..","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for the local repository.","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for default event bus.","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for access services.","Tue Aug 27 15:47:51 BST 2024 garygeeke updated configuration for enterprise repository services (used by access services).","Tue Aug 27 15:47:52 BST 2024 garygeeke updated list of open metadata archives loaded at server start up.","Mon Sep 02 17:09:27 BST 2024 garygeeke updated configuration for access services.","Mon Sep 02 17:09:27 BST 2024 garygeeke updated configuration for enterprise repository services (used by access services)."]} \ No newline at end of file