diff --git a/open-metadata-distribution/omag-server-platform/build.gradle b/open-metadata-distribution/omag-server-platform/build.gradle index 1a4a34d96cf..f52f20885fe 100644 --- a/open-metadata-distribution/omag-server-platform/build.gradle +++ b/open-metadata-distribution/omag-server-platform/build.gradle @@ -384,6 +384,16 @@ distributions { { include 'Egeria*.http' } from { "$rootProject.projectDir/open-metadata-implementation/framework-services/gaf-metadata-management" } { include 'Egeria*.http' } + from { "$rootProject.projectDir/open-metadata-implementation/view-services/my-profile" } + { include 'Egeria*.http' } + from { "$rootProject.projectDir/open-metadata-implementation/view-services/automated-curation" } + { include 'Egeria*.http' } + from { "$rootProject.projectDir/open-metadata-implementation/view-services/asset-catalog" } + { include 'Egeria*.http' } + from { "$rootProject.projectDir/open-metadata-implementation/view-services/glossary-browser" } + { include 'Egeria*.http' } + from { "$rootProject.projectDir/open-metadata-implementation/view-services/glossary-workflow" } + { include 'Egeria*.http' } from { "$rootProject.projectDir/open-metadata-conformance-suite" } { include 'Egeria*.http' } fileMode = 0755 diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/OpenGovernanceClient.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/OpenGovernanceClient.java index 703a5f9d147..46290814e20 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/OpenGovernanceClient.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/OpenGovernanceClient.java @@ -8,7 +8,7 @@ import org.odpi.openmetadata.frameworkservices.gaf.client.OpenMetadataClientBase; /** - * OpenGovernanceClientBase provides an interface to the services that build, monitor and trigger governance actions. + * OpenGovernanceClient provides an interface to the services that build, monitor and trigger governance actions. * This is part of the Governance Action Framework (GAF). */ public class OpenGovernanceClient extends OpenGovernanceClientBase diff --git a/open-metadata-implementation/access-services/governance-server/governance-server-client/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/client/OpenGovernanceClient.java b/open-metadata-implementation/access-services/governance-server/governance-server-client/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/client/OpenGovernanceClient.java new file mode 100644 index 00000000000..db4bd63ce4b --- /dev/null +++ b/open-metadata-implementation/access-services/governance-server/governance-server-client/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/client/OpenGovernanceClient.java @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.accessservices.governanceserver.client; + +import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; +import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworkservices.gaf.client.OpenGovernanceClientBase; + +/** + * OpenGovernanceClient provides an interface to the services that build, monitor and trigger governance actions. + * This is part of the Governance Action Framework (GAF). + */ +public class OpenGovernanceClient extends OpenGovernanceClientBase +{ + private final static String serviceURLMarker = AccessServiceDescription.GOVERNANCE_SERVER_OMAS.getAccessServiceURLMarker(); + + /** + * Create a new client with no authentication embedded in the HTTP request. + * + * @param serverName name of the server to connect to + * @param serverPlatformURLRoot the network address of the server running the OMAS REST services + * + * @throws InvalidParameterException there is a problem creating the client-side components to issue any + * REST API calls. + */ + public OpenGovernanceClient(String serverName, + String serverPlatformURLRoot) throws InvalidParameterException + { + super(serviceURLMarker, serverName, serverPlatformURLRoot); + } + + + /** + * Create a new client that passes userId and password in each HTTP request. This is the + * userId/password of the calling server. The end user's userId is sent on each request. + * + * @param serverName name of the server to connect to + * @param serverPlatformURLRoot the network address of the server running the OMAS REST services + * @param serverUserId caller's userId embedded in all HTTP requests + * @param serverPassword caller's password embedded in all HTTP requests + * + * @throws InvalidParameterException there is a problem creating the client-side components to issue any + * REST API calls. + */ + public OpenGovernanceClient(String serverName, + String serverPlatformURLRoot, + String serverUserId, + String serverPassword) throws InvalidParameterException + { + super(serviceURLMarker, serverName, serverPlatformURLRoot, serverUserId, serverPassword); + } +} diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/EngineServiceDescription.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/EngineServiceDescription.java index a3d761cdf34..f0d78daaac7 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/EngineServiceDescription.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/EngineServiceDescription.java @@ -75,7 +75,7 @@ public enum EngineServiceDescription "event-action", "Executes requested event action services to monitor, assess and maintain context events.", "https://egeria-project.org/services/omes/event-action/overview/", - AccessServiceDescription.DATA_SCIENCE_OMAS.getAccessServiceFullName(), + AccessServiceDescription.GOVERNANCE_ENGINE_OMAS.getAccessServiceDescription(), DeployedImplementationType.EVENT_ACTION_ENGINE.getAssociatedTypeName(), DeployedImplementationType.EVENT_ACTION_SERVICE_CONNECTOR.getAssociatedTypeName(), DeployedImplementationType.EVENT_ACTION_ENGINE.getDeployedImplementationType(), diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/ViewServiceDescription.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/ViewServiceDescription.java index f8aa71fdcfd..f4a4495bbda 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/ViewServiceDescription.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/registration/ViewServiceDescription.java @@ -122,13 +122,25 @@ public enum ViewServiceDescription * Build collections of asset and other metadata. */ COLLECTION_MANAGER (809, - ComponentDevelopmentStatus.TECHNICAL_PREVIEW, + ComponentDevelopmentStatus.IN_DEVELOPMENT, "Collection Manager", "Collection Manager OMVS", "collection-manager", "Build collections of asset and other metadata.", "https://egeria-project.org/services/omvs/collection-manager/overview/", AccessServiceDescription.DIGITAL_SERVICE_OMAS.getAccessServiceFullName()), + + /** + * Manage Egeria's automation services. + */ + AUTOMATED_CURATION (809, + ComponentDevelopmentStatus.IN_DEVELOPMENT, + "Automated Curation", + "Automated Curation OMVS", + "automated-curation", + "Manage Egeria's automation services.", + "https://egeria-project.org/services/omvs/automated-curation/overview/", + AccessServiceDescription.ASSET_OWNER_OMAS.getAccessServiceFullName()), ; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java index dd3217e88d3..b3ed8463e4d 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java @@ -334,6 +334,11 @@ public AttributeTypeDefResponse getAttributeTypeDefByName(@PathVariable String */ @GetMapping(path = "/metadata-elements/{elementGUID}") + @Operation(summary="getMetadataElementByGUID", + description="Retrieve the metadata element using its unique identifier.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/services/gaf-metadata-management/")) + public OpenMetadataElementResponse getMetadataElementByGUID(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @@ -366,6 +371,11 @@ public OpenMetadataElementResponse getMetadataElementByGUID(@PathVariable String */ @PostMapping(path = "/metadata-elements/by-unique-name") + @Operation(summary="getMetadataElementByUniqueName", + description="Retrieve the metadata element using its unique name (typically the qualified name, but it is possible to specify a different property name in the request body as long as it is unique). If multiple matching instances are found, and exception is thrown.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/services/gaf-metadata-management/")) + public OpenMetadataElementResponse getMetadataElementByUniqueName(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @@ -396,6 +406,11 @@ public OpenMetadataElementResponse getMetadataElementByUniqueName(@PathVariable */ @PostMapping(path = "/metadata-elements/guid-by-unique-name") + @Operation(summary="getMetadataElementGUIDByUniqueName", + description="Retrieve the metadata element GUID using its unique name (typically the qualified name, but it is possible to specify a different property name in the request body as long as it is unique). If multiple matching instances are found, and exception is thrown.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/services/gaf-metadata-management/")) + public GUIDResponse getMetadataElementGUIDByUniqueName(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @@ -428,6 +443,11 @@ public GUIDResponse getMetadataElementGUIDByUniqueName(@PathVariable String */ @PostMapping(path = "/metadata-elements/by-search-string") + @Operation(summary="findMetadataElementsWithString", + description="Retrieve the metadata elements that contain the requested string.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/services/gaf-metadata-management/")) + public OpenMetadataElementsResponse findMetadataElementsWithString(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @@ -466,6 +486,11 @@ public OpenMetadataElementsResponse findMetadataElementsWithString(@PathVariable */ @GetMapping(path = "/related-elements/{elementGUID}/any-type") + @Operation(summary="getAllRelatedMetadataElements", + description="Retrieve the metadata elements connected to the supplied element.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/services/gaf-metadata-management/")) + public RelatedMetadataElementListResponse getAllRelatedMetadataElements(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/DataEngineProxyServicesResource.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/DataEngineProxyServicesResource.java index a0564974764..c6c2ebd49b0 100644 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/DataEngineProxyServicesResource.java +++ b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/DataEngineProxyServicesResource.java @@ -3,6 +3,7 @@ package org.odpi.openmetadata.governanceservers.dataengineproxy; import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.governanceservers.dataengineproxy.model.ProcessLoadResponse; import org.odpi.openmetadata.governanceservers.dataengineproxy.rest.DataEngineProxyRestService; @@ -23,8 +24,15 @@ public class DataEngineProxyServicesResource { DataEngineProxyRestService dataEngineProxyRestService = new DataEngineProxyRestService(); @GetMapping("/load") + + @Operation(summary="load", + description="Force an explicit load of metadata from the connected Data Engine", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/data-engine-proxy/")) + public ProcessLoadResponse load(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId) { + @PathVariable("userId") String userId) + { return dataEngineProxyRestService.load(serverName, userId); } diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/ffdc/EngineHostServicesAuditCode.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/ffdc/EngineHostServicesAuditCode.java index ea4271a84b5..ef218c3dbf4 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/ffdc/EngineHostServicesAuditCode.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/ffdc/EngineHostServicesAuditCode.java @@ -421,6 +421,16 @@ public enum EngineHostServicesAuditCode implements AuditLogMessageSet "Review the error messages and resolve the cause of the problem. Once resolved, it is possible to " + "retry the governance action by updating its status back to REQUESTED status."), + /** + * ENGINE-HOST-SERVICES-0035 - Failed to retrieve active engine actions. The exception was {0} with error message {1} + */ + ENGINE_ACTION_SCAN_FAILED("ENGINE-HOST-SERVICES-0035", + AuditLogRecordSeverityLevel.EXCEPTION, + "Failed to retrieve active engine actions. The exception was {0} with error message {1}", + "The engine host is unable to retrieve the active engine actions from the metadata access server as part of its regular scan for work.", + "Review the error messages and resolve the cause of the problem. Once resolved, the engine host should retry its scan as part of its normal refresh processing. " + + "However, if the problem was in hte engine host, you may need to restart it to clear the problem."), + /** * ENGINE-HOST-SERVICES-0150 - {0} in server {1} is not configured with the platform URL root for the {2} */ diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/listener/GovernanceServerOutTopicListener.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/listener/GovernanceServerOutTopicListener.java index 0cc2effec4a..83985744243 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/listener/GovernanceServerOutTopicListener.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/listener/GovernanceServerOutTopicListener.java @@ -38,7 +38,7 @@ public GovernanceServerOutTopicListener(GovernanceEngineMap governanceEngineHand /** - * Process an event that was published by the Governance Engine OMAS. The events cover all defined governance engines and actions. + * Process an event that was published by the Governance Server OMAS. The events cover all defined governance engines and actions. * This method only needs to pass on the information to those governance engines hosted in this server. * Events relating to other governance engines can be ignored. So can events that are for capabilities not supported by these engine * services. @@ -52,7 +52,28 @@ public void processEvent(GovernanceServerEvent event) if (event != null) { - if (event instanceof GovernanceServiceConfigurationEvent governanceServiceEvent) + if (event instanceof EngineActionEvent engineActionEvent) + { + GovernanceEngineHandler governanceEngineHandler = governanceEngineHandlers.getGovernanceEngineHandler(engineActionEvent.getGovernanceEngineName()); + + if (governanceEngineHandler != null) + { + try + { + governanceEngineHandler.executeEngineAction(engineActionEvent.getEngineActionGUID()); + } + catch (Exception error) + { + auditLog.logException(actionDescription, + EngineHostServicesAuditCode.ENGINE_ACTION_FAILED.getMessageDefinition(engineActionEvent.getGovernanceEngineName(), + error.getClass().getName(), + error.getMessage()), + engineActionEvent.toString(), + error); + } + } + } + else if (event instanceof GovernanceServiceConfigurationEvent governanceServiceEvent) { GovernanceEngineHandler governanceEngineHandler = governanceEngineHandlers.getGovernanceEngineHandler(governanceServiceEvent.getGovernanceEngineName()); @@ -97,27 +118,6 @@ else if (event instanceof GovernanceEngineConfigurationEvent governanceEngineEve } } } - else if (event instanceof EngineActionEvent engineActionEvent) - { - GovernanceEngineHandler governanceEngineHandler = governanceEngineHandlers.getGovernanceEngineHandler(engineActionEvent.getGovernanceEngineName()); - - if (governanceEngineHandler != null) - { - try - { - governanceEngineHandler.executeEngineAction(engineActionEvent.getEngineActionGUID()); - } - catch (Exception error) - { - auditLog.logException(actionDescription, - EngineHostServicesAuditCode.ENGINE_ACTION_FAILED.getMessageDefinition(engineActionEvent.getGovernanceEngineName(), - error.getClass().getName(), - error.getMessage()), - engineActionEvent.toString(), - error); - } - } - } } } } diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/server/EngineHostOperationalServices.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/server/EngineHostOperationalServices.java index f2df4da8f74..423b160676d 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/server/EngineHostOperationalServices.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/server/EngineHostOperationalServices.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.accessservices.governanceserver.client.GovernanceContextClient; import org.odpi.openmetadata.accessservices.governanceserver.client.GovernanceEngineConfigurationClient; import org.odpi.openmetadata.accessservices.governanceserver.client.GovernanceServerEventClient; +import org.odpi.openmetadata.accessservices.governanceserver.client.OpenGovernanceClient; import org.odpi.openmetadata.adminservices.configuration.properties.EngineHostServicesConfig; import org.odpi.openmetadata.adminservices.configuration.properties.EngineServiceConfig; import org.odpi.openmetadata.adminservices.configuration.registration.*; @@ -127,13 +128,16 @@ else if (((configuration.getEngineList() == null) || (configuration.getEngineLis * clients. */ GAFRESTClient restClient; + OpenGovernanceClient openGovernanceClient; if (localServerPassword == null) { restClient = new GAFRESTClient(accessServiceServerName, accessServiceRootURL, auditLog); + openGovernanceClient = new OpenGovernanceClient(accessServiceServerName, accessServiceRootURL); } else { restClient = new GAFRESTClient(accessServiceServerName, accessServiceRootURL, localServerUserId, localServerUserId, auditLog); + openGovernanceClient = new OpenGovernanceClient(accessServiceServerName, accessServiceRootURL, localServerUserId, localServerUserId); } /* @@ -163,6 +167,8 @@ else if (((configuration.getEngineList() == null) || (configuration.getEngineLis restClient, maxPageSize); + + /* * Initialize each of the integration services and accumulate the integration connector handlers for the * integration daemon handler. @@ -220,6 +226,7 @@ else if (((configuration.getEngineList() == null) || (configuration.getEngineLis */ EngineConfigurationRefreshThread configurationRefreshThread = new EngineConfigurationRefreshThread(governanceEngineHandlers, eventClient, + openGovernanceClient, auditLog, localServerUserId, localServerName, diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/threads/EngineConfigurationRefreshThread.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/threads/EngineConfigurationRefreshThread.java index a7e37570101..ee087aa49c2 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/threads/EngineConfigurationRefreshThread.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/threads/EngineConfigurationRefreshThread.java @@ -4,8 +4,11 @@ package org.odpi.openmetadata.governanceservers.enginehostservices.threads; import org.odpi.openmetadata.accessservices.governanceserver.client.GovernanceServerEventClient; +import org.odpi.openmetadata.accessservices.governanceserver.client.OpenGovernanceClient; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.governanceaction.properties.EngineActionElement; +import org.odpi.openmetadata.frameworks.governanceaction.properties.EngineActionStatus; import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler; import org.odpi.openmetadata.governanceservers.enginehostservices.enginemap.GovernanceEngineMap; import org.odpi.openmetadata.governanceservers.enginehostservices.ffdc.EngineHostServicesAuditCode; @@ -25,6 +28,7 @@ public class EngineConfigurationRefreshThread implements Runnable { private final GovernanceEngineMap engineHandlers; private final GovernanceServerEventClient eventClient; + private final OpenGovernanceClient openGovernanceClient; private final AuditLog auditLog; private final String localServerUserId; private final String localServerName; @@ -41,7 +45,8 @@ public class EngineConfigurationRefreshThread implements Runnable * needed to log errors if the metadata server is not available. * * @param engineHandlers list of governance engine handlers running locally mapped to their names - * @param eventClient client for accessing the Governance Engine OMAS OutTopic + * @param eventClient client for accessing the Governance Server OMAS OutTopic + * @param openGovernanceClient client for working with engine actions * @param auditLog logging destination * @param localServerUserId userId for configuration requests * @param localServerName this server's name @@ -50,6 +55,7 @@ public class EngineConfigurationRefreshThread implements Runnable */ public EngineConfigurationRefreshThread(GovernanceEngineMap engineHandlers, GovernanceServerEventClient eventClient, + OpenGovernanceClient openGovernanceClient, AuditLog auditLog, String localServerUserId, String localServerName, @@ -58,6 +64,7 @@ public EngineConfigurationRefreshThread(GovernanceEngineMap eng { this.engineHandlers = engineHandlers; this.eventClient = eventClient; + this.openGovernanceClient = openGovernanceClient; this.auditLog = auditLog; this.localServerUserId = localServerUserId; this.localServerName = localServerName; @@ -157,6 +164,56 @@ public void run() waitToRetry(); } + int startFrom = 0; + int pageSize = 10; + + try + { + List activeEngineActions = openGovernanceClient.getActiveEngineActions(localServerUserId, + startFrom, + pageSize); + + while (activeEngineActions != null) + { + for (EngineActionElement engineActionElement : activeEngineActions) + { + if ((engineActionElement != null) && (engineActionElement.getActionStatus() == EngineActionStatus.APPROVED)) + { + GovernanceEngineHandler governanceEngineHandler = engineHandlers.getGovernanceEngineHandler(engineActionElement.getGovernanceEngineName()); + + if (governanceEngineHandler != null) + { + try + { + governanceEngineHandler.executeEngineAction(engineActionElement.getElementHeader().getGUID()); + } + catch (Exception error) + { + auditLog.logException(actionDescription, + EngineHostServicesAuditCode.ENGINE_ACTION_FAILED.getMessageDefinition(engineActionElement.getGovernanceEngineName(), + error.getClass().getName(), + error.getMessage()), + engineActionElement.toString(), + error); + } + } + } + } + + startFrom = startFrom + pageSize; + activeEngineActions = openGovernanceClient.getActiveEngineActions(localServerUserId, + startFrom, + pageSize); + } + } + catch (Exception error) + { + auditLog.logException(actionDescription, + EngineHostServicesAuditCode.ENGINE_ACTION_SCAN_FAILED.getMessageDefinition(error.getClass().getName(), + error.getMessage()), + error); + } + waitToRetry(); } } diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-spring/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/server/spring/EngineHostServicesResource.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-spring/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/server/spring/EngineHostServicesResource.java index c9cf2818b24..98da2a879cb 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-spring/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/server/spring/EngineHostServicesResource.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-spring/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/server/spring/EngineHostServicesResource.java @@ -3,6 +3,7 @@ package org.odpi.openmetadata.engineservices.assetanalysis.server.spring; import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.governanceservers.enginehostservices.rest.GovernanceEngineSummariesResponse; @@ -42,6 +43,11 @@ public class EngineHostServicesResource */ @GetMapping(path = "/governance-engines/{governanceEngineName}/summary") + @Operation(summary="getGovernanceEngineSummary", + description="Retrieve the description and status of the requested governance engine.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-engine/")) + public GovernanceEngineSummaryResponse getGovernanceEngineSummary(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceEngineName) @@ -52,7 +58,7 @@ public GovernanceEngineSummaryResponse getGovernanceEngineSummary(@PathVariable /** - * Return a summary of each of the governance engines running in the Engine Host Server. + * Return a summary of each of the governance engines running in the Engine Host. * * @param serverName engine host server name * @param userId calling user @@ -62,6 +68,11 @@ public GovernanceEngineSummaryResponse getGovernanceEngineSummary(@PathVariable */ @GetMapping(path = "/governance-engines/summary") + @Operation(summary="getGovernanceEngineSummaries", + description="Return a summary of each of the governance engines running in the Engine Host.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-engine/")) + public GovernanceEngineSummariesResponse getGovernanceEngineSummaries(@PathVariable String serverName, @PathVariable String userId) { @@ -81,6 +92,11 @@ public GovernanceEngineSummariesResponse getGovernanceEngineSummaries(@PathVaria */ @GetMapping(path = "/engine-service/{serviceURLMarker}/governance-engines/summary") + @Operation(summary="getGovernanceEngineSummaries", + description="Retrieve the description and status of each governance engine assigned to a specific Open Metadata Engine Service (OMES).", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-engine/")) + public GovernanceEngineSummariesResponse getGovernanceEngineSummaries(@PathVariable String serverName, @PathVariable String userId, @PathVariable String serviceURLMarker) @@ -106,6 +122,14 @@ public GovernanceEngineSummariesResponse getGovernanceEngineSummaries(@PathVaria */ @GetMapping(path = "/governance-engines/{governanceEngineName}/refresh-config") + @Operation(summary="refreshConfig", + description="Request that the governance engine refresh its configuration by calling the metadata server. " + + "This request is useful if the metadata server has an outage, particularly while the " + + "governance server is initializing. This request just ensures that the latest configuration " + + "is in use.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-engine-definition/")) + public VoidResponse refreshConfig(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceEngineName) diff --git a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-api/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/rest/IntegrationDaemonStatusResponse.java b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-api/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/rest/IntegrationDaemonStatusResponse.java index be1705cf11a..e5e8821a72b 100644 --- a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-api/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/rest/IntegrationDaemonStatusResponse.java +++ b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-api/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/rest/IntegrationDaemonStatusResponse.java @@ -7,11 +7,8 @@ import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.properties.IntegrationDaemonStatus; -import org.odpi.openmetadata.governanceservers.integrationdaemonservices.properties.IntegrationServiceSummary; -import java.io.Serial; import java.util.Arrays; -import java.util.List; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -26,9 +23,6 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class IntegrationDaemonStatusResponse extends FFDCResponseBase { - @Serial - private static final long serialVersionUID = 1L; - private IntegrationDaemonStatus integrationDaemonStatus = null; diff --git a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/spring/IntegrationDaemonResource.java b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/spring/IntegrationDaemonResource.java index 1cc88fb3e32..2e09b3bb5f9 100644 --- a/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/spring/IntegrationDaemonResource.java +++ b/open-metadata-implementation/governance-server-services/integration-daemon-services/integration-daemon-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/integrationdaemonservices/server/spring/IntegrationDaemonResource.java @@ -3,6 +3,7 @@ package org.odpi.openmetadata.governanceservers.integrationdaemonservices.server.spring; import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.PropertiesResponse; @@ -32,7 +33,7 @@ public class IntegrationDaemonResource /** - * Return a summary of each of the integration services' and integration groups' status. + * Return the status of each of the integration services and integration groups running in the integration daemon. * * @param serverName integration daemon name * @param userId calling user @@ -43,6 +44,11 @@ public class IntegrationDaemonResource */ @GetMapping(path = "/status") + @Operation(summary="getIntegrationDaemonStatus", + description="Return the status of each of the integration services and integration groups running in the integration daemon.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-daemon/")) + public IntegrationDaemonStatusResponse getIntegrationDaemonStatus(@PathVariable String serverName, @PathVariable String userId) { @@ -51,7 +57,7 @@ public IntegrationDaemonStatusResponse getIntegrationDaemonStatus(@PathVariable /** - * Retrieve the configuration properties of the named connector. + * Retrieve the configuration properties of the named integration connector running in the integration daemon. * * @param serverName integration daemon server name * @param userId calling user @@ -64,6 +70,11 @@ public IntegrationDaemonStatusResponse getIntegrationDaemonStatus(@PathVariable */ @GetMapping(path = "/integration-connectors/{connectorName}/configuration-properties") + @Operation(summary="getConfigurationProperties", + description="Retrieve the configuration properties of the named integration connector running in the integration daemon.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-connector/")) + public PropertiesResponse getConfigurationProperties(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectorName) @@ -73,7 +84,8 @@ public PropertiesResponse getConfigurationProperties(@PathVariable String server /** - * Update the configuration properties of the connectors, or specific connector if a connector name is supplied. + * Update the configuration properties of the integration connectors, or specific integration connector if a + * connector name is supplied. This update is in memory and will not persist over a server restart. * * @param serverName integration daemon server name * @param userId calling user @@ -86,6 +98,11 @@ public PropertiesResponse getConfigurationProperties(@PathVariable String server */ @PostMapping(path = "/integration-connectors/configuration-properties") + @Operation(summary="updateConfigurationProperties", + description="Update the configuration properties of the integration connectors, or specific integration connector if a connector name is supplied. This update is in memory and will not persist over a server restart.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-connector/")) + public VoidResponse updateConfigurationProperties(@PathVariable String serverName, @PathVariable String userId, @RequestBody ConnectorConfigPropertiesRequestBody requestBody) @@ -96,6 +113,7 @@ public VoidResponse updateConfigurationProperties(@PathVariable String /** * Update the endpoint network address for a specific integration connector. + * This update is in memory and will not persist over a server restart. * * @param serverName integration daemon server name * @param userId calling user @@ -109,6 +127,11 @@ public VoidResponse updateConfigurationProperties(@PathVariable String */ @PostMapping(path = "/integration-connectors/{connectorName}/endpoint-network-address") + @Operation(summary="updateEndpointNetworkAddress", + description="Update the endpoint network address for a specific integration connector. This update is in memory and will not persist over a server restart.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-connector/")) + public VoidResponse updateEndpointNetworkAddress(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectorName, @@ -120,6 +143,7 @@ public VoidResponse updateEndpointNetworkAddress(@PathVariable String /** * Update the connection for a specific integration connector. + * This update is in memory and will not persist over a server restart. * * @param serverName integration daemon server name * @param userId calling user @@ -133,6 +157,11 @@ public VoidResponse updateEndpointNetworkAddress(@PathVariable String */ @PostMapping(path = "/integration-connectors/{connectorName}/connection") + @Operation(summary="updateConnectorConnection", + description="Update the connection for a specific integration connector. This update is in memory and will not persist over a server restart.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-connector/")) + public VoidResponse updateConnectorConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectorName, @@ -157,6 +186,11 @@ public VoidResponse updateConnectorConnection(@PathVariable String serverNa */ @PostMapping(path = "/integration-connectors/refresh") + @Operation(summary="refreshConnectors", + description="Issue a refresh() request on all connectors running in the integration daemon, or a specific connector if the connector name is specified.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-daemon/")) + public VoidResponse refreshConnectors(@PathVariable String serverName, @PathVariable String userId, @RequestBody(required = false) NameRequestBody requestBody) @@ -166,7 +200,7 @@ public VoidResponse refreshConnectors(@PathVariable String /** - * Issue a refresh() request on all connectors running in the integration daemon, or a specific connector if the connector name is specified. + * Restart all connectors running in the integration daemon, or restart a specific connector if the connector name is specified. * * @param serverName integration daemon server name * @param userId calling user @@ -180,6 +214,11 @@ public VoidResponse refreshConnectors(@PathVariable String */ @PostMapping(path = "/integration-connectors/restart") + @Operation(summary="restartConnectors", + description="Restart all connectors running in the integration daemon, or restart a specific connector if the connector name is specified.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-daemon/")) + public VoidResponse restartConnectors(@PathVariable String serverName, @PathVariable String userId, @RequestBody(required = false) NameRequestBody requestBody) @@ -204,6 +243,11 @@ public VoidResponse restartConnectors(@PathVariable String */ @PostMapping(path = "/integration-services/{serviceURLMarker}/refresh") + @Operation(summary="refreshService", + description="Process a refresh request. This calls refresh on all connectors within the integration service.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-daemon/")) + public VoidResponse refreshService(@PathVariable String serverName, @PathVariable String userId, @PathVariable String serviceURLMarker, @@ -214,7 +258,7 @@ public VoidResponse refreshService(@PathVariable String /** - * Request that the integration service shutdown and recreate its integration connectors. + * Request that the integration service shutdown and restart its integration connectors. * * @param serverName name of the integration daemon * @param userId identifier of calling user @@ -228,6 +272,11 @@ public VoidResponse refreshService(@PathVariable String */ @PostMapping(path = "/integration-services/{serviceURLMarker}/restart") + @Operation(summary="restartService", + description="Request that the integration service shutdown and restart its integration connectors.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-daemon/")) + public VoidResponse restartService(@PathVariable String serverName, @PathVariable String userId, @PathVariable String serviceURLMarker, @@ -237,8 +286,6 @@ public VoidResponse restartService(@PathVariable String } - - /** * Return a summary of each of the integration services' status. * @@ -251,6 +298,11 @@ public VoidResponse restartService(@PathVariable String */ @GetMapping(path = "/integration-services/summary") + @Operation(summary="getIntegrationServicesSummaries", + description="Return a summary of each of the integration services' status.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-daemon/")) + public IntegrationServiceSummaryResponse getIntegrationServicesSummaries(@PathVariable String serverName, @PathVariable String userId) { @@ -270,6 +322,11 @@ public IntegrationServiceSummaryResponse getIntegrationServicesSummaries(@PathVa */ @GetMapping(path = "/integration-groups/{integrationGroupName}/summary") + @Operation(summary="getIntegrationGroupSummary", + description="Retrieve the description and status of the requested integration group.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-daemon/")) + public IntegrationGroupSummaryResponse getIntegrationGroupSummary(@PathVariable String serverName, @PathVariable String userId, @PathVariable String integrationGroupName) @@ -278,7 +335,6 @@ public IntegrationGroupSummaryResponse getIntegrationGroupSummary(@PathVariable } - /** * Return a summary of each of the integration groups running in the integration daemon. * @@ -290,6 +346,11 @@ public IntegrationGroupSummaryResponse getIntegrationGroupSummary(@PathVariable */ @GetMapping(path = "/integration-groups/summary") + @Operation(summary="getIntegrationGroupSummaries", + description="Return a summary of each of the integration groups running in the integration daemon.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-daemon/")) + public IntegrationGroupSummariesResponse getIntegrationGroupSummaries(@PathVariable String serverName, @PathVariable String userId) { @@ -298,9 +359,9 @@ public IntegrationGroupSummariesResponse getIntegrationGroupSummaries(@PathVaria /** - * Request that the integration group refresh its configuration by calling the metadata server. + * Request that the integration group refresh its configuration by calling the metadata access server. * Changes to the connector configuration will result in the affected connectors being restarted. - * This request is useful if the metadata server has an outage, particularly while the + * This request is useful if the metadata access server has an outage, particularly while the * integration daemon is initializing. This request just ensures that the latest configuration * is in use. * @@ -315,6 +376,15 @@ public IntegrationGroupSummariesResponse getIntegrationGroupSummaries(@PathVaria */ @GetMapping(path = "/integration-groups/{integrationGroupName}/refresh-config") + @Operation(summary="refreshIntegrationGroupConfig", + description="Request that the integration group refresh its configuration by calling the metadata access server. " + + "Changes to the connector configuration will result in the affected connectors being restarted. " + + "This request is useful if the metadata access server has an outage, particularly while the " + + "integration daemon is initializing. This request just ensures that the latest configuration " + + "is in use.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/integration-group/")) + public VoidResponse refreshIntegrationGroupConfig(@PathVariable String serverName, @PathVariable String userId, @PathVariable String integrationGroupName) diff --git a/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/lineagewarehouse/server/spring/LineageWarehouseResource.java b/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/lineagewarehouse/server/spring/LineageWarehouseResource.java index 79190225113..43f6e726aeb 100644 --- a/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/lineagewarehouse/server/spring/LineageWarehouseResource.java +++ b/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-spring/src/main/java/org/odpi/openmetadata/governanceservers/lineagewarehouse/server/spring/LineageWarehouseResource.java @@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.governanceservers.lineagewarehouse.model.LineageQueryParameters; import org.odpi.openmetadata.governanceservers.lineagewarehouse.requests.ElementHierarchyRequest; @@ -25,18 +26,17 @@ import org.springframework.web.bind.annotation.RestController; /** - * * The OpenLineageResource provides the server-side interface of the Lineage Warehouse Services governance server. + * The OpenLineageResource provides the server-side interface of the Lineage Warehouse Services governance server. */ @RestController @RequestMapping("/servers/{serverName}/open-metadata/lineage-warehouse/users/{userId}") @Tag(name="Lineage Warehouse Services", - description="The Lineage Warehouse Services provides a historic reporting warehouse for lineage. It listens to events that are sent out by the Asset Lineage OMAS, and stores lineage data in a database. ", + description="The Lineage Warehouse Services provides a historic reporting warehouse for lineage. It listens to events that are sent out by the Asset Lineage OMAS, and stores lineage data in its own lineage warehouse store.", externalDocs=@ExternalDocumentation(description="Further Information",url="https://egeria-project.org/services/lineage-warehouse-services/")) public class LineageWarehouseResource { - private final LineageWarehouseRESTServices restAPI = new LineageWarehouseRESTServices(); /** @@ -50,16 +50,25 @@ public class LineageWarehouseResource * @return A subgraph containing all relevant paths, in graphSON format. */ @PostMapping(path = "/lineage/entities/{guid}", produces = MediaType.APPLICATION_JSON_VALUE) - public LineageResponse lineage( - @PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("guid") String guid, - @RequestBody LineageQueryParameters params) { + + @Operation(summary="lineage", + description="Returns the graph 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 extended " + + "the condensed path by querying a different method.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/lineage-warehouse/")) + + public LineageResponse lineage(@PathVariable("serverName") String serverName, + @PathVariable("userId") String userId, + @PathVariable("guid") String guid, + @RequestBody LineageQueryParameters params) + { return restAPI.lineage(serverName, userId, params.getScope(), guid, params.isIncludeProcesses()); } + /** - * Gets entity details. + * Gets details of a specific entity from the lineage repository. * * @param serverName the server name * @param userId the user id @@ -67,10 +76,16 @@ public LineageResponse lineage( * @return the entity details */ @GetMapping(path = "/lineage/entities/{guid}/details", produces = MediaType.APPLICATION_JSON_VALUE) - public LineageVertexResponse getEntityDetails( - @PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @PathVariable("guid") String guid) { + + @Operation(summary="getEntityDetails", + description="Gets details of a specific entity from the lineage repository.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/lineage-warehouse/")) + + public LineageVertexResponse getEntityDetails(@PathVariable("serverName") String serverName, + @PathVariable("userId") String userId, + @PathVariable("guid") String guid) + { return restAPI.getEntityDetails(serverName, userId, guid); } @@ -82,9 +97,15 @@ public LineageVertexResponse getEntityDetails( * @return the available entities types from lineage repository */ @GetMapping(path = "/lineage/types", produces = MediaType.APPLICATION_JSON_VALUE) - public LineageTypesResponse getTypes( - @PathVariable("serverName") String serverName, - @PathVariable("userId") String userId) { + + @Operation(summary="getTypes", + description="Gets available entities types from lineage repository.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/lineage-warehouse/")) + + public LineageTypesResponse getTypes(@PathVariable("serverName") String serverName, + @PathVariable("userId") String userId) + { return restAPI.getTypes(serverName, userId); } @@ -95,29 +116,44 @@ public LineageTypesResponse getTypes( * @param serverName the server name * @param userId the user id * @param type the type of the nodes name to search for - * @param searchValue the string to be contained in the display name of the node - case insensitive + * @param searchValue the string to be contained in the display name of the node - case-insensitive * @param limit the maximum number of node names to retrieve * @return the node names that match criteria */ @GetMapping(path = "/lineage/nodes", produces = MediaType.APPLICATION_JSON_VALUE) - public LineageNodeNamesResponse getNodes( - @PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestParam("type") String type, - @RequestParam("name") String searchValue, - @RequestParam("limit") int limit) { + + @Operation(summary="getNodes", + description="Gets nodes names of certain type with display name containing a certain value.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/lineage-warehouse/")) + + public LineageNodeNamesResponse getNodes(@PathVariable("serverName") String serverName, + @PathVariable("userId") String userId, + @RequestParam("type") String type, + @RequestParam("name") String searchValue, + @RequestParam("limit") int limit) + { return restAPI.getNodes(serverName, userId, new NodeNamesSearchCriteria(type, searchValue, limit)); } + @PostMapping(path = "lineage/search", produces = MediaType.APPLICATION_JSON_VALUE) - public LineageSearchResponse getSearchResults(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestBody LineageSearchRequest lineageSearchRequest) { + + @Operation(summary="getSearchResults", + description="Request lineage results based on search request.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/lineage-warehouse/")) + + public LineageSearchResponse getSearchResults(@PathVariable("serverName") String serverName, + @PathVariable("userId") String userId, + @RequestBody LineageSearchRequest lineageSearchRequest) + { return restAPI.search(serverName, userId, lineageSearchRequest); } + /** - * Returns a subraph representing the hierarchy of a certain node, based on the request + * Returns a subgraph representing the hierarchy of a certain node, based on the request * * @param userId calling user. * @param serverName name of the server instance to connect to. @@ -126,9 +162,16 @@ public LineageSearchResponse getSearchResults(@PathVariable("serverName") String * @return A subgraph containing all relevant paths, in graphSON format. */ @PostMapping(path = "elements/hierarchy", produces = MediaType.APPLICATION_JSON_VALUE) - public LineageResponse getElementHierarchy(@PathVariable("serverName") String serverName, - @PathVariable("userId") String userId, - @RequestBody ElementHierarchyRequest elementHierarchyRequest) { + + @Operation(summary="getElementHierarchy", + description="Returns a subgraph representing the hierarchy of a certain node, based on the request.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/lineage-warehouse/")) + + public LineageResponse getElementHierarchy(@PathVariable("serverName") String serverName, + @PathVariable("userId") String userId, + @RequestBody ElementHierarchyRequest elementHierarchyRequest) + { return restAPI.getElementHierarchy(serverName, userId, elementHierarchyRequest); } } diff --git a/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle b/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle index e9f2a7c889c..1211849abaa 100644 --- a/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle +++ b/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle @@ -46,6 +46,7 @@ dependencies { // The following are only included at runtime for the full platform (ie adminChassisOnly is not set as a property) if (!project.hasProperty("adminChassisOnly")) { + runtimeOnly project(':open-metadata-implementation:view-services:automated-curation:automated-curation-spring') runtimeOnly project(':open-metadata-implementation:view-services:server-author-view:server-author-view-spring') runtimeOnly project(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-spring') runtimeOnly project(':open-metadata-implementation:view-services:glossary-browser:glossary-browser-spring') diff --git a/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle b/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle index 589b80878ad..2eb1330c96a 100644 --- a/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle +++ b/open-metadata-implementation/server-chassis/server-chassis-spring/build.gradle @@ -45,6 +45,8 @@ dependencies { runtimeOnly project(':open-metadata-implementation:server-operations:server-operations-spring') if (!project.hasProperty("adminChassisOnly")) { + runtimeOnly project(':open-metadata-implementation:view-services:automated-curation:automated-curation-spring') + runtimeOnly project(':open-metadata-implementation:view-services:collection-manager:collection-manager-spring') runtimeOnly project(':open-metadata-implementation:view-services:server-author-view:server-author-view-spring') runtimeOnly project(':open-metadata-implementation:view-services:glossary-author-view:glossary-author-view-spring') runtimeOnly project(':open-metadata-implementation:view-services:glossary-browser:glossary-browser-spring') diff --git a/open-metadata-implementation/view-services/automated-curation/Egeria-automated-curation-omvs.http b/open-metadata-implementation/view-services/automated-curation/Egeria-automated-curation-omvs.http new file mode 100644 index 00000000000..f80c6c56f42 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/Egeria-automated-curation-omvs.http @@ -0,0 +1,6 @@ +# Egeria-automated-curation-view-service + +### +# @name Get My Profile +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation +Authorization: Bearer {{token}} diff --git a/open-metadata-implementation/view-services/automated-curation/README.md b/open-metadata-implementation/view-services/automated-curation/README.md new file mode 100644 index 00000000000..9cf075e4f6e --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/README.md @@ -0,0 +1,14 @@ + + + +![InDev](../../../images/egeria-content-status-in-development.png#pagewidth) + +# Automated Curation OMVS + +The Automated Curation OMVS enables the caller to manage the execution of integration connectors and engine actions. + +Link to documentation: [https://egeria-project.org/services/omvs/automated-curation/overview/](https://egeria-project.org/services/omvs/automated-curation/overview/) + +---- +License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), +Copyright Contributors to the Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/README.md b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/README.md new file mode 100644 index 00000000000..d636ddaced0 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/README.md @@ -0,0 +1,15 @@ + + + +# Automated Curation Open Metadata View Service (OMVS) server-side implementation + +The Automated Curation OMVS server-side support is organized in the following top level packages + +* admin - AutomatedCurationAdmin controls this OMVS's lifecycle. It is initialised here receiving the view service configuration. It is shutdown here. +* ffdc - defines the exceptions and audit log messages. +* rest - defines the payloads used on the REST API. +* server - implementation of the view service + +---- +License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), +Copyright Contributors to the ODPi Egeria project. \ No newline at end of file diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/build.gradle b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/build.gradle new file mode 100644 index 00000000000..0e26ca476db --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/build.gradle @@ -0,0 +1,26 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright Contributors to the ODPi Egeria project. + */ + + +dependencies { + implementation project(':open-metadata-implementation:user-security:token-controller') + implementation project(':open-metadata-implementation:admin-services:admin-services-api') + implementation project(':open-metadata-implementation:common-services:ffdc-services') + implementation project(':open-metadata-implementation:common-services:multi-tenant') + implementation project(':open-metadata-implementation:admin-services:admin-services-registration') + implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-connector-framework') + implementation project(':open-metadata-implementation:frameworks:governance-action-framework') + implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-api') + implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-client') + implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-api') + implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-client') + compileOnly 'com.fasterxml.jackson.core:jackson-annotations' + implementation 'org.slf4j:slf4j-api' +} + +java { + withJavadocJar() +} diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/AutomatedCurationAdmin.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/AutomatedCurationAdmin.java new file mode 100644 index 00000000000..da0531f5448 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/AutomatedCurationAdmin.java @@ -0,0 +1,105 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.viewservices.automatedcuration.admin; + +import org.odpi.openmetadata.adminservices.configuration.properties.ViewServiceConfig; +import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; +import org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException; +import org.odpi.openmetadata.adminservices.registration.ViewServiceAdmin; +import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.viewservices.automatedcuration.ffdc.AutomatedCurationAuditCode; +import org.odpi.openmetadata.viewservices.automatedcuration.server.AutomatedCurationInstance; + +/** + * AutomatedCurationAdmin is the class that is called by the View Server to initialize and terminate + * the Automated Curation OMVS. The initialization call provides this OMVS with the Audit log and configuration. + */ +public class AutomatedCurationAdmin extends ViewServiceAdmin +{ + private AuditLog auditLog = null; + private AutomatedCurationInstance instance = null; + private String serverName = null; + + /** + * Default constructor + */ + public AutomatedCurationAdmin() + { + } + + + /** + * Initialize the Automated Curation view service. + * + * @param serverName name of the local server + * @param viewServiceConfig specific configuration properties for this view service. + * @param auditLog audit log component for logging messages. + * @param serverUserName user id to use to issue calls to the remote server. + * @param maxPageSize maximum page size. 0 means unlimited + * @throws OMAGConfigurationErrorException invalid parameters in the configuration properties. + */ + @Override + public void initialize(String serverName, + ViewServiceConfig viewServiceConfig, + AuditLog auditLog, + String serverUserName, + int maxPageSize) throws OMAGConfigurationErrorException + + { + + final String actionDescription = "initialize"; + + auditLog.logMessage(actionDescription, AutomatedCurationAuditCode.SERVICE_INITIALIZING.getMessageDefinition()); + + this.auditLog = auditLog; + this.serverName = serverName; + + try + { + /* + * The name and rootURL of a repository server are not passed at this stage - they are not known at this stage + * because they are set at runtime by the user and potentially changed between operations. + */ + this.instance = new AutomatedCurationInstance(serverName, + auditLog, + serverUserName, + maxPageSize, + viewServiceConfig.getOMAGServerName(), + viewServiceConfig.getOMAGServerPlatformRootURL()); + + auditLog.logMessage(actionDescription, + AutomatedCurationAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), + viewServiceConfig.toString()); + + } + catch (Exception error) + { + auditLog.logException(actionDescription, + AutomatedCurationAuditCode.SERVICE_INSTANCE_FAILURE.getMessageDefinition(error.getMessage()), + viewServiceConfig.toString(), + error); + + super.throwUnexpectedInitializationException(actionDescription, + ViewServiceDescription.AUTOMATED_CURATION.getViewServiceFullName(), + error); + } + } + + /** + * Shutdown the Automated Curation service. + */ + @Override + public void shutdown() + { + final String actionDescription = "shutdown"; + + auditLog.logMessage(actionDescription, AutomatedCurationAuditCode.SERVICE_TERMINATING.getMessageDefinition(serverName)); + + if (instance != null) + { + this.instance.shutdown(); + } + + auditLog.logMessage(actionDescription, AutomatedCurationAuditCode.SERVICE_SHUTDOWN.getMessageDefinition(serverName)); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/package-info.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/package-info.java new file mode 100644 index 00000000000..c21ed27cff9 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * The admin package controls the start-up and shutdown of the view service. + */ +package org.odpi.openmetadata.viewservices.automatedcuration.admin; \ No newline at end of file diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/ffdc/AutomatedCurationAuditCode.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/ffdc/AutomatedCurationAuditCode.java new file mode 100644 index 00000000000..6771e43dfa9 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/ffdc/AutomatedCurationAuditCode.java @@ -0,0 +1,163 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.viewservices.automatedcuration.ffdc; + + +import org.odpi.openmetadata.frameworks.auditlog.AuditLogRecordSeverityLevel; +import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition; +import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet; + +/** + * The AutomatedCurationAuditCode is used to define the message content for the OMRS Audit Log. + * The 5 fields in the enum are: + * + */ +public enum AutomatedCurationAuditCode implements AuditLogMessageSet +{ + /** + * OMVS-AUTOMATED-CURATION-0001 The Automated Curation Open Metadata View Service (OMVS) is initializing + */ + SERVICE_INITIALIZING("OMVS-AUTOMATED-CURATION-0001", + AuditLogRecordSeverityLevel.STARTUP, + "The Automated Curation Open Metadata View Service (OMVS) is initializing", + "The local server is initializing the Automated Curation Open Metadata View Service. If the initialization is successful then audit message OMVS-AUTOMATED-CURATION-0002 will be issued, if there were errors then they should be shown in the audit log. ", + "No action is required. This is part of the normal operation of the Automated Curation Open Metadata View Service."), + + /** + * OMVS-AUTOMATED-CURATION-0002 The Automated Curation Open Metadata View Service (OMVS) is initialized + */ + SERVICE_INITIALIZED("OMVS-AUTOMATED-CURATION-0002", + AuditLogRecordSeverityLevel.STARTUP, + "The Automated Curation Open Metadata View Service (OMVS) is initialized", + "The Automated Curation OMVS has completed initialization. Calls will be accepted by this service, if OMRS is also configured and the view server has been started. ", + "No action is required. This is part of the normal operation of the Automated Curation Open Metadata View Service. Once the OMRS is configured and the server is started, Automated Curationview service requests can be accepted."), + + /** + * OMVS-AUTOMATED-CURATION-0003 The Automated Curation Open Metadata View Service (OMVS) is shutting down + */ + SERVICE_SHUTDOWN("OMVS-AUTOMATED-CURATION-0003", + AuditLogRecordSeverityLevel.SHUTDOWN, + "The Automated Curation Open Metadata View Service (OMVS) is shutting down", + "The local server has requested shutdown of the Automated Curation OMVS.", + "No action is required. The operator should verify that shutdown was intended. This is part of the normal operation of the Automated Curation OMVS."), + + /** + * OMVS-AUTOMATED-CURATION-0004 The Automated Curation Open Metadata View Service (OMVS) is unable to initialize a new instance; error message is {0} + */ + SERVICE_INSTANCE_FAILURE("OMVS-AUTOMATED-CURATION-0004", + AuditLogRecordSeverityLevel.EXCEPTION, + "The Automated Curation Open Metadata View Service (OMVS) is unable to initialize a new instance; error message is {0}", + "The view service detected an error during the start up of a specific server instance. Its services are not available for the server.", + "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, restart the server."), + + /** + * OMVS-AUTOMATED-CURATION-0005 The Automated Curation Open Metadata View Service (OMVS) is shutting down server instance {0} + */ + SERVICE_TERMINATING("OMVS-AUTOMATED-CURATION-0005", + AuditLogRecordSeverityLevel.SHUTDOWN, + "The Automated Curation Open Metadata View Service (OMVS) is shutting down server instance {0}", + "The local handler has requested shut down of the Automated Curation OMVS.", + "No action is required. This is part of the normal operation of the service."), + + /** + * OMVS-AUTOMATED-CURATION-0006 The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2} + */ + UNEXPECTED_EXCEPTION("OMVS-AUTOMATED-CURATION-0006", + AuditLogRecordSeverityLevel.EXCEPTION, + "The Open Metadata Service has generated an unexpected {0} exception during method {1}. The message was: {2}", + "The request returned an Exception.", + "This is probably a logic error. Review the stack trace to identify where the error occurred and work to resolve the cause.") + ; + + private final String logMessageId; + private final AuditLogRecordSeverityLevel severity; + private final String logMessage; + private final String systemAction; + private final String userAction; + + + /** + * The constructor for AutomatedCurationAuditCode expects to be passed one of the enumeration rows defined in + * AutomatedCurationAuditCode above. For example: + * AutomatedCurationAuditCode auditCode = AutomatedCurationAuditCode.SERVER_NOT_AVAILABLE; + * This will expand out to the 5 parameters shown below. + * + * @param messageId - unique identifier for the message + * @param severity - severity of the message + * @param message - text for the message + * @param systemAction - description of the action taken by the system when the condition happened + * @param userAction - instructions for resolving the situation, if any + */ + AutomatedCurationAuditCode(String messageId, + AuditLogRecordSeverityLevel severity, + String message, + String systemAction, + String userAction) + { + this.logMessageId = messageId; + this.severity = severity; + this.logMessage = message; + this.systemAction = systemAction; + this.userAction = userAction; + } + + + /** + * Retrieve a message definition object for logging. This method is used when there are no message inserts. + * + * @return message definition object. + */ + public AuditLogMessageDefinition getMessageDefinition() + { + return new AuditLogMessageDefinition(logMessageId, + severity, + logMessage, + systemAction, + userAction); + } + + + /** + * Retrieve a message definition object for logging. This method is used when there are values to be inserted into the message. + * + * @param params array of parameters (all strings). They are inserted into the message according to the numbering in the message text. + * @return message definition object. + */ + public AuditLogMessageDefinition getMessageDefinition(String ...params) + { + AuditLogMessageDefinition messageDefinition = new AuditLogMessageDefinition(logMessageId, + severity, + logMessage, + systemAction, + userAction); + messageDefinition.setMessageParameters(params); + return messageDefinition; + } + + + /** + * JSON-style toString + * + * @return string of property names and values for this enum + */ + @Override + public String toString() + { + return "AutomatedCurationAuditCode{" + + "logMessageId='" + logMessageId + '\'' + + ", severity=" + severity + + ", logMessage='" + logMessage + '\'' + + ", systemAction='" + systemAction + '\'' + + ", userAction='" + userAction + '\'' + + ", messageDefinition=" + getMessageDefinition() + + '}'; + } +} + diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/ffdc/package-info.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/ffdc/package-info.java new file mode 100644 index 00000000000..e82e1fe0d56 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/ffdc/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * This package provides the definition of the error handling for the Automated Curation OMVS. + */ +package org.odpi.openmetadata.viewservices.automatedcuration.ffdc; diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/package-info.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/package-info.java new file mode 100644 index 00000000000..0c21bd58e82 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/package-info.java @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + *

This package defines the beans used to build the REST request and response payloads.

+ *

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

+ *

The response beans encode the return type of the method as well as any exceptions and associated messages.

+ */ +package org.odpi.openmetadata.viewservices.automatedcuration.rest; diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationInstance.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationInstance.java new file mode 100644 index 00000000000..6a1e1635935 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationInstance.java @@ -0,0 +1,182 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.viewservices.automatedcuration.server; + + +import org.odpi.openmetadata.accessservices.assetowner.client.*; +import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; +import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstance; +import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; + +/** + * AutomatedCurationInstance caches references to objects it needs for a specific server. + * It is also responsible for registering itself in the instance map. + */ + +public class AutomatedCurationInstance extends OMVSServiceInstance +{ + private static final ViewServiceDescription myDescription = ViewServiceDescription.AUTOMATED_CURATION; + + private final AssetCertificationManager assetCertificationManager; + private final AssetLicenseManager assetLicenseManager; + private final ExternalReferenceManager externalReferenceManager; + private final ValidValuesAssetOwner validValuesAssetOwner; + private final FileSystemAssetOwner fileSystemAssetOwner; + private final CSVFileAssetOwner csvFileAssetOwner; + private final AvroFileAssetOwner avroFileAssetOwner; + private final OpenMetadataStoreClient openMetadataStoreClient; + private final OpenGovernanceClient openGovernanceClient; + private final ConnectedAssetClient connectedAssetClient; + + /** + * Set up the Automated Curation OMVS instance + * + * @param serverName name of this server + * @param auditLog logging destination + * @param localServerUserId userId used for server initiated actions + * @param maxPageSize maximum page size + * @param remoteServerName remote server name + * @param remoteServerURL remote server URL + * @throws InvalidParameterException problem with server name or platform URL + */ + public AutomatedCurationInstance(String serverName, + AuditLog auditLog, + String localServerUserId, + int maxPageSize, + String remoteServerName, + String remoteServerURL) throws InvalidParameterException + { + super(serverName, + myDescription.getViewServiceName(), + auditLog, + localServerUserId, + maxPageSize, + remoteServerName, + remoteServerURL); + + assetCertificationManager = new AssetCertificationManager(remoteServerName, remoteServerURL); + assetLicenseManager = new AssetLicenseManager(remoteServerName, remoteServerURL); + externalReferenceManager = new ExternalReferenceManager(remoteServerName, remoteServerURL); + validValuesAssetOwner = new ValidValuesAssetOwner(remoteServerName, remoteServerURL); + fileSystemAssetOwner = new FileSystemAssetOwner(remoteServerName, remoteServerURL, auditLog); + csvFileAssetOwner = new CSVFileAssetOwner(remoteServerName, remoteServerURL, auditLog); + avroFileAssetOwner = new AvroFileAssetOwner(remoteServerName, remoteServerURL, auditLog); + connectedAssetClient = new ConnectedAssetClient(remoteServerName, remoteServerURL); + openMetadataStoreClient = new OpenMetadataStoreClient(remoteServerName, remoteServerURL); + openGovernanceClient = new OpenGovernanceClient(remoteServerName, remoteServerURL); + } + + + /** + * Return the client. This client is from Asset Owner OMAS and is for maintaining certifications on assets. + * + * @return client + */ + public AssetCertificationManager getAssetCertificationManager() + { + return assetCertificationManager; + } + + + /** + * Return the client. This client is from Asset Owner OMAS and is for maintaining licenses on assets. + * + * @return client + */ + public AssetLicenseManager getAssetLicenseManager() + { + return assetLicenseManager; + } + + + /** + * Return the client. This client is from Asset Owner OMAS and is for maintaining external references for assets. + * + * @return client + */ + public ExternalReferenceManager getExternalReferenceManager() + { + return externalReferenceManager; + } + + + /** + * Return the client. This client is from Asset Owner OMAS and is for maintaining valid values for assets. + * + * @return client + */ + public ValidValuesAssetOwner getValidValuesAssetOwner() + { + return validValuesAssetOwner; + } + + + /** + * Return the client. This client is from Asset Owner OMAS and is for maintaining information about file system assets. + * + * @return client + */ + public FileSystemAssetOwner getFileSystemAssetOwner() + { + return fileSystemAssetOwner; + } + + + /** + * Return the client. This client is from Asset Owner OMAS and is for maintaining information about CSV Files. + * + * @return client + */ + public CSVFileAssetOwner getCSVFileAssetOwner() + { + return csvFileAssetOwner; + } + + + /** + * Return the client. This client is from Asset Owner OMAS and is for maintaining information about Avro Files. + * + * @return client + */ + public AvroFileAssetOwner getAvroFileAssetOwner() + { + return avroFileAssetOwner; + } + + + /** + * Return the connected asset client. This client is from Open Connector Framework (OCF) and is for retrieving information about + * assets and creating connectors. + * + * @return client + */ + public ConnectedAssetClient getConnectedAssetClient() + { + return connectedAssetClient; + } + + + /** + * Return the open metadata store client. This client is from the Governance Action Framework (GAF) and is for accessing and + * maintaining all types of metadata. + * + * @return client + */ + public OpenMetadataStoreClient getOpenMetadataStoreClient() + { + return openMetadataStoreClient; + } + + + /** + * Return the open governance client. This client is from the Governance Action Framework (GAF) and is for + * working with automation services. + * + * @return client + */ + public OpenGovernanceClient getOpenGovernanceClient() + { + return openGovernanceClient; + } +} diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationInstanceHandler.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationInstanceHandler.java new file mode 100644 index 00000000000..b47284acfd1 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationInstanceHandler.java @@ -0,0 +1,311 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.viewservices.automatedcuration.server; + + +import org.odpi.openmetadata.accessservices.assetowner.client.*; +import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.commonservices.multitenant.OMVSServiceInstanceHandler; +import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; + + + +/** + * AutomatedCurationInstanceHandler retrieves information from the instance map for the + * view service instances. The instance map is thread-safe. Instances are added + * and removed by the AutomatedCurationAdmin class. + */ +public class AutomatedCurationInstanceHandler extends OMVSServiceInstanceHandler +{ + /** + * Default constructor registers the view service + */ + public AutomatedCurationInstanceHandler() + { + super(ViewServiceDescription.AUTOMATED_CURATION.getViewServiceName()); + + AutomatedCurationRegistration.registerViewService(); + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public AssetCertificationManager getAssetCertificationManager(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getAssetCertificationManager(); + } + + return null; + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public AssetLicenseManager getAssetLicenseManager(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getAssetLicenseManager(); + } + + return null; + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public ExternalReferenceManager getExternalReferenceManager(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getExternalReferenceManager(); + } + + return null; + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public ValidValuesAssetOwner getValidValuesAssetOwner(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getValidValuesAssetOwner(); + } + + return null; + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public FileSystemAssetOwner getFileSystemAssetOwner(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getFileSystemAssetOwner(); + } + + return null; + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public CSVFileAssetOwner getCSVFileAssetOwner(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getCSVFileAssetOwner(); + } + + return null; + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public AvroFileAssetOwner getAvroFileAssetOwner(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getAvroFileAssetOwner(); + } + + return null; + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public ConnectedAssetClient getConnectedAssetClient(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getConnectedAssetClient(); + } + + return null; + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public OpenMetadataStoreClient getOpenMetadataStoreClient(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getOpenMetadataStoreClient(); + } + + return null; + } + + + /** + * This method returns the object for the tenant to use to work with the Asset Owner API. + * + * @param serverName name of the server that the request is for + * @param userId local server userid + * @param serviceOperationName service operation - usually the top level rest call + * @return SubjectAreaNodeClients subject area nodes API objects + * @throws InvalidParameterException unknown server/service + * @throws UserNotAuthorizedException User not authorized to call this service + * @throws PropertyServerException internal error + */ + public OpenGovernanceClient getOpenGovernanceClient(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + AutomatedCurationInstance instance = (AutomatedCurationInstance) getServerServiceInstance(userId, serverName, serviceOperationName); + + if (instance != null) + { + return instance.getOpenGovernanceClient(); + } + + return null; + } +} diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java new file mode 100644 index 00000000000..04ed7e6ef61 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java @@ -0,0 +1,1881 @@ +/* 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.automatedcuration.server; + +import org.odpi.openmetadata.accessservices.assetowner.client.OpenGovernanceClient; +import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; +import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; +import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; +import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessProperties; +import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessStepProperties; +import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionTypeProperties; +import org.odpi.openmetadata.frameworkservices.gaf.rest.*; +import org.odpi.openmetadata.tokencontroller.TokenController; +import org.slf4j.LoggerFactory; + + +/** + * The AutomatedCurationRESTServices provides the implementation of the Automated Curation Open Metadata View Service (OMVS). + */ + +public class AutomatedCurationRESTServices extends TokenController +{ + private static final AutomatedCurationInstanceHandler instanceHandler = new AutomatedCurationInstanceHandler(); + + private static final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); + + private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(AutomatedCurationRESTServices.class), + instanceHandler.getServiceName()); + + private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); + + /** + * Default constructor + */ + public AutomatedCurationRESTServices() + { + } + + + /* ===================================================================================================================== + * A governance action type describes a template to call a single engine action. + */ + + /** + * Create a new metadata element to represent a governance action type. + * + * @param serverName name of the service to route the request to + * @param requestBody properties about the process to store + * + * @return unique identifier of the new governance action type 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 GUIDResponse createGovernanceActionType(String serverName, + GovernanceActionTypeProperties requestBody) + { + final String methodName = "createGovernanceActionType"; + + 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) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setGUID(handler.createGovernanceActionType(userId, requestBody)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Update the metadata element representing a governance action type. + * + * @param serverName name of the service to route the request to + * @param governanceActionTypeGUID unique identifier of the metadata element to update + * @param requestBody new properties for the metadata element + * + * @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 updateGovernanceActionType(String serverName, + String governanceActionTypeGUID, + UpdateGovernanceActionTypeRequestBody requestBody) + { + final String methodName = "updateGovernanceActionType"; + final String propertiesParameterName = "requestBody.getProperties"; + + 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) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + GovernanceActionTypeProperties properties = requestBody.getProperties(); + + invalidParameterHandler.validateObject(properties, propertiesParameterName, methodName); + + handler.updateGovernanceActionType(userId, + governanceActionTypeGUID, + requestBody.getMergeUpdate(), + properties); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Remove the metadata element representing a governance action type. + * + * @param serverName name of the service to route the request to + * @param governanceActionTypeGUID unique identifier of the metadata element to remove + * @param requestBody null request body + * + * @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) + */ + @SuppressWarnings(value = "unused") + public VoidResponse removeGovernanceActionType(String serverName, + String governanceActionTypeGUID, + NullRequestBody requestBody) + { + final String methodName = "removeGovernanceActionType"; + + 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); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.removeGovernanceActionType(userId, governanceActionTypeGUID); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the list of governance action type metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param serverName name of the service to route the request to + * @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 startFrom paging start point + * @param pageSize maximum results that can be returned + * @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 GovernanceActionTypesResponse findGovernanceActionTypes(String serverName, + boolean startsWith, + boolean endsWith, + boolean ignoreCase, + int startFrom, + int pageSize, + StringRequestBody requestBody) + { + final String methodName = "findGovernanceActionTypes"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionTypesResponse response = new GovernanceActionTypesResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + if (requestBody != null) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.findGovernanceActionTypes(userId, + instanceHandler.getSearchString(requestBody.getString(), startsWith, endsWith, ignoreCase), + startFrom, + pageSize)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the list of governance action type metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param serverName name of the service to route the request to + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * @param requestBody name to search for + * + * @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 GovernanceActionTypesResponse getGovernanceActionTypesByName(String serverName, + int startFrom, + int pageSize, + StringRequestBody requestBody) + { + final String methodName = "getGovernanceActionTypesByName"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionTypesResponse response = new GovernanceActionTypesResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + if (requestBody != null) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.getGovernanceActionTypesByName(userId, + requestBody.getString(), + startFrom, + pageSize)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the governance action type metadata element with the supplied unique identifier. + * + * @param serverName name of the service to route the request to + * @param governanceActionTypeGUID unique identifier of the governance action type + * + * @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 GovernanceActionTypeResponse getGovernanceActionTypeByGUID(String serverName, + String governanceActionTypeGUID) + { + final String methodName = "getGovernanceActionTypeByGUID"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionTypeResponse response = new GovernanceActionTypeResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElement(handler.getGovernanceActionTypeByGUID(userId, governanceActionTypeGUID)); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + + /* ===================================================================================================================== + * A governance action process describes a well-defined series of steps that gets something done. + * The steps are defined using GovernanceActionProcessSteps. + */ + + /** + * Create a new metadata element to represent a governance action process. + * + * @param serverName name of the service to route the request to + * @param requestBody properties about the process to store and status value for the new process (default = ACTIVE) + * + * @return unique identifier of the new process 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) + */ + @SuppressWarnings(value = "unused") + public GUIDResponse createGovernanceActionProcess(String serverName, + NewGovernanceActionProcessRequestBody requestBody) + { + final String methodName = "createGovernanceActionProcess"; + + 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) && (requestBody.getProperties() != null)) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + GovernanceActionProcessProperties processProperties = requestBody.getProperties(); + + response.setGUID(handler.createGovernanceActionProcess(userId, processProperties, requestBody.getProcessStatus())); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Update the metadata element representing a governance action process. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the metadata element to update + * @param requestBody new properties for the metadata element + * + * @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 updateGovernanceActionProcess(String serverName, + String processGUID, + UpdateGovernanceActionProcessRequestBody requestBody) + { + final String methodName = "updateGovernanceActionProcess"; + + 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) && (requestBody.getProperties() != null)) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.updateGovernanceActionProcess(userId, + processGUID, + requestBody.getMergeUpdate(), + requestBody.getProcessStatus(), + requestBody.getProperties()); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + + return response; + } + + + /** + * Update the zones for the asset so that it becomes visible to consumers. + * (The zones are set to the list of zones in the publishedZones option configured for each + * instance of the Asset Manager OMAS). + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the metadata element to publish + * @param requestBody null request body + * + * @return + * 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) + */ + @SuppressWarnings(value = "unused") + public VoidResponse publishGovernanceActionProcess(String serverName, + String processGUID, + NullRequestBody requestBody) + { + final String methodName = "publishGovernanceActionProcess"; + final String processGUIDParameterName = "processGUID"; + + 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); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.publishGovernanceActionProcess(userId, processGUID); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Update the zones for the asset so that it is no longer visible to consumers. + * (The zones are set to the list of zones in the defaultZones option configured for each + * instance of the Asset Manager OMAS. This is the setting when the process is first created). + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the metadata element to withdraw + * @param requestBody null request body + * + * @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) + */ + @SuppressWarnings(value = "unused") + public VoidResponse withdrawGovernanceActionProcess(String serverName, + String processGUID, + NullRequestBody requestBody) + { + final String methodName = "withdrawGovernanceActionProcess"; + final String processGUIDParameterName = "processGUID"; + + 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); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.withdrawGovernanceActionProcess(userId, processGUID); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Remove the metadata element representing a governance action process. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the metadata element to remove + * @param requestBody null request body + * + * @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) + */ + @SuppressWarnings(value = "unused") + public VoidResponse removeGovernanceActionProcess(String serverName, + String processGUID, + NullRequestBody requestBody) + { + final String methodName = "removeGovernanceActionProcess"; + final String processGUIDParameterName = "processGUID"; + + 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); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.removeGovernanceActionProcess(userId, processGUID); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the list of governance action process metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param serverName name of the service to route the request to + * @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 startFrom paging start point + * @param pageSize maximum results that can be returned + * @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 GovernanceActionProcessElementsResponse findGovernanceActionProcesses(String serverName, + boolean startsWith, + boolean endsWith, + boolean ignoreCase, + int startFrom, + int pageSize, + StringRequestBody requestBody) + { + final String methodName = "findGovernanceActionProcesses"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionProcessElementsResponse response = new GovernanceActionProcessElementsResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + if (requestBody != null) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.getGovernanceActionProcessesByName(userId, + instanceHandler.getSearchString(requestBody.getString(), startsWith, endsWith, ignoreCase), + startFrom, + pageSize)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the list of governance action process metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param serverName name of the service to route the request to + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * @param requestBody name to search for + * + * @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 GovernanceActionProcessElementsResponse getGovernanceActionProcessesByName(String serverName, + int startFrom, + int pageSize, + StringRequestBody requestBody) + { + final String methodName = "getGovernanceActionProcessesByName"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionProcessElementsResponse response = new GovernanceActionProcessElementsResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + if (requestBody != null) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.getGovernanceActionProcessesByName(userId, + requestBody.getString(), + startFrom, + pageSize)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the governance action process metadata element with the supplied unique identifier. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the requested metadata element + * + * @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 GovernanceActionProcessElementResponse getGovernanceActionProcessByGUID(String serverName, + String processGUID) + { + final String methodName = "getGovernanceActionProcessByGUID"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionProcessElementResponse response = new GovernanceActionProcessElementResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElement(handler.getGovernanceActionProcessByGUID(userId, processGUID)); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + + /* ===================================================================================================================== + * A governance action process step describes a step in a governance action process + */ + + /** + * Create a new metadata element to represent a governance action process step. + * + * @param serverName name of the service to route the request to + * @param requestBody properties about the process to store + * + * @return unique identifier of the new governance action process step 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 GUIDResponse createGovernanceActionProcessStep(String serverName, + GovernanceActionProcessStepProperties requestBody) + { + final String methodName = "createGovernanceActionProcessStep"; + + 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) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setGUID(handler.createGovernanceActionProcessStep(userId, requestBody)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Update the metadata element representing a governance action process step. + * + * @param serverName name of the service to route the request to + * @param processStepGUID unique identifier of the metadata element to update + * @param requestBody new properties for the metadata element + * + * @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 updateGovernanceActionProcessStep(String serverName, + String processStepGUID, + UpdateGovernanceActionProcessStepRequestBody requestBody) + { + final String methodName = "updateGovernanceActionProcessStep"; + final String propertiesParameterName = "requestBody.getProperties"; + + 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) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + invalidParameterHandler.validateObject(requestBody.getProperties(), propertiesParameterName, methodName); + + handler.updateGovernanceActionProcessStep(userId, + processStepGUID, + requestBody.getMergeUpdate(), + requestBody.getProperties()); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Remove the metadata element representing a governance action process step. + * + * @param serverName name of the service to route the request to + * @param processStepGUID unique identifier of the metadata element to remove + * @param requestBody null request body + * + * @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) + */ + @SuppressWarnings(value = "unused") + public VoidResponse removeGovernanceActionProcessStep(String serverName, + String processStepGUID, + NullRequestBody requestBody) + { + final String methodName = "removeGovernanceActionProcessStep"; + + 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); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.removeGovernanceActionProcessStep(userId, processStepGUID); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the list of governance action process step metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param serverName name of the service to route the request to + * @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 startFrom paging start point + * @param pageSize maximum results that can be returned + * @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 GovernanceActionProcessStepsResponse findGovernanceActionProcessSteps(String serverName, + boolean startsWith, + boolean endsWith, + boolean ignoreCase, + int startFrom, + int pageSize, + StringRequestBody requestBody) + { + final String methodName = "findGovernanceActionProcessSteps"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionProcessStepsResponse response = new GovernanceActionProcessStepsResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + if (requestBody != null) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.findGovernanceActionProcessSteps(userId, + instanceHandler.getSearchString(requestBody.getString(), startsWith, endsWith, ignoreCase), + startFrom, + pageSize)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the list of governance action process step metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param serverName name of the service to route the request to + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * @param requestBody name to search for + * + * @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 GovernanceActionProcessStepsResponse getGovernanceActionProcessStepsByName(String serverName, + int startFrom, + int pageSize, + StringRequestBody requestBody) + { + final String methodName = "getGovernanceActionProcessStepsByName"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionProcessStepsResponse response = new GovernanceActionProcessStepsResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + if (requestBody != null) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.getGovernanceActionProcessStepsByName(userId, + requestBody.getString(), + startFrom, + pageSize)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the governance action process step metadata element with the supplied unique identifier. + * + * @param serverName name of the service to route the request to + * @param processStepGUID unique identifier of the governance action process step + * + * @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 GovernanceActionProcessStepResponse getGovernanceActionProcessStepByGUID(String serverName, + String processStepGUID) + { + final String methodName = "getGovernanceActionProcessStepByGUID"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionProcessStepResponse response = new GovernanceActionProcessStepResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElement(handler.getGovernanceActionProcessStepByGUID(userId, processStepGUID)); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Set up a link between a governance action process and a governance action process step. This defines the first + * step in the process. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the governance action process + * @param processStepGUID unique identifier of the governance action process step + * @param requestBody optional guard + * + * @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 setupFirstActionProcessStep(String serverName, + String processGUID, + String processStepGUID, + String requestBody) + { + final String methodName = "setupFirstActionProcessStep"; + + 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); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.setupFirstActionProcessStep(userId, processGUID, processStepGUID, requestBody); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Return the governance action process step that is the first step in a governance action process. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the governance action process + * + * @return properties of the governance action process step 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 GovernanceActionProcessStepResponse getFirstActionProcessStep(String serverName, + String processGUID) + { + final String methodName = "getFirstActionProcessStep"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionProcessStepResponse response = new GovernanceActionProcessStepResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElement(handler.getFirstActionProcessStep(userId, processGUID)); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Remove the link between a governance process and that governance action process step that defines its first step. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the governance action process + * @param requestBody null request body + * + * @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) + */ + @SuppressWarnings(value = "unused") + public VoidResponse removeFirstProcessStep(String serverName, + String processGUID, + NullRequestBody requestBody) + { + final String methodName = "removeFirstActionProcessStep"; + + 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); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.removeFirstActionProcessStep(userId, processGUID); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Add a link between two governance action process steps to show that one follows on from the other when a governance action process + * is executing. + * + * @param serverName name of the service to route the request to + * @param currentProcessStepGUID unique identifier of the governance action process step that defines the previous step in the governance action process + * @param nextProcessStepGUID unique identifier of the governance action process step that defines the next step in the governance action process + * @param requestBody guard required for this next step to proceed - or null for always run the next step plus flags. + * + * @return unique identifier of the new link 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 GUIDResponse setupNextActionProcessStep(String serverName, + String currentProcessStepGUID, + String nextProcessStepGUID, + NextGovernanceActionProcessStepRequestBody requestBody) + { + final String methodName = "setupNextActionProcessStep"; + + 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) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setGUID(handler.setupNextActionProcessStep(userId, + currentProcessStepGUID, + nextProcessStepGUID, + requestBody.getGuard(), + requestBody.getMandatoryGuard(), + false)); //todo + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Update the properties of the link between two governance action process steps that shows that one follows on from the other when a governance + * action process is executing. + * + * @param serverName name of the service to route the request to + * @param nextProcessStepLinkGUID unique identifier of the relationship between the governance action process steps + * @param requestBody guard required for this next step to proceed - or null for always run the next step - and flags + * + * @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) + */ + @SuppressWarnings(value = "unused") + public VoidResponse updateNextActionProcessStep(String serverName, + String nextProcessStepLinkGUID, + NextGovernanceActionProcessStepRequestBody requestBody) + { + final String methodName = "updateNextActionProcessStep"; + + 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) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.updateNextActionProcessStep(userId, + nextProcessStepLinkGUID, + requestBody.getGuard(), + requestBody.getMandatoryGuard(), + false); // todo + } + 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 next action process step defined for the governance action process. + * + * @param serverName name of the service to route the request to + * @param processStepGUID unique identifier of the current governance action process step + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return return the list of relationships and attached governance action process steps 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 NextGovernanceActionProcessStepsResponse getNextProcessSteps(String serverName, + String processStepGUID, + int startFrom, + int pageSize) + { + final String methodName = "getNextGovernanceActionProcessSteps"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + NextGovernanceActionProcessStepsResponse response = new NextGovernanceActionProcessStepsResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.getNextGovernanceActionProcessSteps(userId, + processStepGUID, + startFrom, + pageSize)); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Remove a follow-on step from a governance action process. + * + * @param serverName name of the service to route the request to + * @param actionLinkGUID unique identifier of the relationship between the governance action process steps + * @param requestBody null request body + * + * @return void or + * InvalidParameterException one of the parameters is invalid or + * UserNotAuthorizedException the user is not authorized to issue this request or + * PropertyServerException there is a problem reported in the open metadata server(s) + */ + @SuppressWarnings(value = "unused") + public VoidResponse removeNextActionProcessStep(String serverName, + String actionLinkGUID, + NullRequestBody requestBody) + { + final String methodName = "removeNextActionProcessStep"; + + 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); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.removeNextActionProcessStep(userId, actionLinkGUID); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + /* + * Engine Actions + */ + + /** + * Request the status and properties of an executing engine action request. + * + * @param serverName name of server instance to route request to + * @param engineActionGUID identifier of the engine action request. + * + * @return engine action properties and status or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + public EngineActionElementResponse getEngineAction(String serverName, + String engineActionGUID) + { + final String methodName = "getEngineAction"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + AuditLog auditLog = null; + EngineActionElementResponse response = new EngineActionElementResponse(); + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElement(handler.getEngineAction(userId, engineActionGUID)); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the engine actions that are known to the server. + * + * @param serverName name of server instance to route request to + * @param startFrom starting from element + * @param pageSize maximum elements to return + * + * @return list of engine action elements or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + public EngineActionElementsResponse getEngineActions(String serverName, + int startFrom, + int pageSize) + { + final String methodName = "getEngineActions"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + AuditLog auditLog = null; + EngineActionElementsResponse response = new EngineActionElementsResponse(); + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.getEngineActions(userId, + startFrom, + pageSize)); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the engine actions that are still in process. + * + * @param serverName name of server instance to route request to + * @param startFrom starting from element + * @param pageSize maximum elements to return + * + * @return list of engine action elements or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + public EngineActionElementsResponse getActiveEngineActions(String serverName, + int startFrom, + int pageSize) + { + final String methodName = "getActiveEngineActions"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + AuditLog auditLog = null; + EngineActionElementsResponse response = new EngineActionElementsResponse(); + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.getActiveEngineActions(userId, startFrom, pageSize)); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the list of engine action metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param serverName name of the service to route the request to + * @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 startFrom paging start point + * @param pageSize maximum results that can be returned + * @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 EngineActionElementsResponse findEngineActions(String serverName, + boolean startsWith, + boolean endsWith, + boolean ignoreCase, + int startFrom, + int pageSize, + StringRequestBody requestBody) + { + final String methodName = "findEngineActions"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + EngineActionElementsResponse response = new EngineActionElementsResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + if (requestBody != null) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.findEngineActions(userId, + instanceHandler.getSearchString(requestBody.getString(), startsWith, endsWith, ignoreCase), + startFrom, + pageSize)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Retrieve the list of engine action metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param serverName name of the service to route the request to + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * @param requestBody name to search for + * + * @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 EngineActionElementsResponse getEngineActionsByName(String serverName, + int startFrom, + int pageSize, + StringRequestBody requestBody) + { + final String methodName = "getEngineActionsByName"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + EngineActionElementsResponse response = new EngineActionElementsResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + if (requestBody != null) + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElements(handler.getEngineActionsByName(userId, + requestBody.getString(), + startFrom, + pageSize)); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Create a governance action in the metadata store which will trigger the governance action service + * associated with the supplied request type. The governance action remains to act as a record + * of the actions taken for auditing. + * + * @param serverName name of server instance to route request to + * @param governanceEngineName name of the governance engine that should execute the request + * @param requestBody properties for the governance action and to pass to the governance action service + * + * @return unique identifier of the governance action or + * InvalidParameterException null qualified name + * UserNotAuthorizedException this governance action service is not authorized to create a governance action + * PropertyServerException there is a problem with the metadata store + */ + public GUIDResponse initiateEngineAction(String serverName, + String governanceEngineName, + EngineActionRequestBody requestBody) + { + final String methodName = "initiateEngineAction"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + AuditLog auditLog = null; + GUIDResponse response = new GUIDResponse(); + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + + if (requestBody != null) + { + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setGUID(handler.initiateEngineAction(userId, + requestBody.getQualifiedName(), + requestBody.getDomainIdentifier(), + requestBody.getDisplayName(), + requestBody.getDescription(), + requestBody.getRequestSourceGUIDs(), + requestBody.getActionTargets(), + requestBody.getReceivedGuards(), + requestBody.getStartTime(), + governanceEngineName, + requestBody.getRequestType(), + requestBody.getRequestParameters(), + requestBody.getProcessName(), + requestBody.getRequestSourceName(), + requestBody.getOriginatorServiceName(), + requestBody.getOriginatorEngineName())); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Using the named governance action type as a template, initiate an engine action. + * + * @param serverName name of server instance to route request to + * @param requestBody properties to initiate the new instance of the engine action + * + * @return unique identifier of the first governance action of the process or + * InvalidParameterException null or unrecognized qualified name of the process + * UserNotAuthorizedException this governance action service is not authorized to create a governance action process + * PropertyServerException there is a problem with the metadata store + */ + public GUIDResponse initiateGovernanceActionType(String serverName, + GovernanceActionTypeRequestBody requestBody) + { + final String methodName = "initiateGovernanceActionType"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + AuditLog auditLog = null; + GUIDResponse response = new GUIDResponse(); + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + + if (requestBody != null) + { + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setGUID(handler.initiateGovernanceActionType(userId, + requestBody.getGovernanceActionTypeQualifiedName(), + requestBody.getRequestSourceGUIDs(), + requestBody.getActionTargets(), + requestBody.getStartTime(), + requestBody.getRequestParameters(), + requestBody.getOriginatorServiceName(), + requestBody.getOriginatorEngineName())); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + /** + * Using the named governance action process as a template, initiate a chain of governance actions. + * + * @param serverName name of server instance to route request to + * @param requestBody properties to initiate the new instance of the process + * + * @return unique identifier of the first governance action of the process or + * InvalidParameterException null or unrecognized qualified name of the process + * UserNotAuthorizedException this governance action service is not authorized to create a governance action process + * PropertyServerException there is a problem with the metadata store + */ + public GUIDResponse initiateGovernanceActionProcess(String serverName, + GovernanceActionProcessRequestBody requestBody) + { + final String methodName = "initiateGovernanceActionProcess"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + AuditLog auditLog = null; + GUIDResponse response = new GUIDResponse(); + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + + if (requestBody != null) + { + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setGUID(handler.initiateGovernanceActionProcess(userId, + requestBody.getProcessQualifiedName(), + requestBody.getRequestSourceGUIDs(), + requestBody.getActionTargets(), + requestBody.getStartTime(), + requestBody.getRequestParameters(), + requestBody.getOriginatorServiceName(), + requestBody.getOriginatorEngineName())); + } + else + { + restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); + } + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } +} diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRegistration.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRegistration.java new file mode 100644 index 00000000000..9164ba01d48 --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRegistration.java @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.viewservices.automatedcuration.server; + +import org.odpi.openmetadata.adminservices.registration.OMAGViewServiceRegistration; +import org.odpi.openmetadata.adminservices.configuration.registration.ServiceOperationalStatus; +import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; +import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceRegistrationEntry; +import org.odpi.openmetadata.viewservices.automatedcuration.admin.AutomatedCurationAdmin; + +/** + * AutomatedCurationRegistration registers the view service with the OMAG Server administration services. + * This registration must be driven once at server start up. The OMAG Server administration services + * then use this registration information as confirmation that there is an implementation of this + * view service in the server, and it can be configured and used. + */ +public class AutomatedCurationRegistration +{ + /** + * Pass information about this view service to the OMAG Server administration services. + */ + public static void registerViewService() + { + ViewServiceDescription myDescription = ViewServiceDescription.AUTOMATED_CURATION; + ViewServiceRegistrationEntry myRegistration = new ViewServiceRegistrationEntry(myDescription, + ServiceOperationalStatus.ENABLED, + AutomatedCurationAdmin.class.getName()); + OMAGViewServiceRegistration.registerViewService(myRegistration); + } +} diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/README.md b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/README.md new file mode 100644 index 00000000000..184ec1b99bc --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/README.md @@ -0,0 +1,6 @@ + + + +# Glossary Browser Open Metadata View Service (OMVS) with Spring + +The Glossary Browser OMVS spring module uses spring to create the server-side support for the REST services. \ No newline at end of file diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/build.gradle b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/build.gradle new file mode 100644 index 00000000000..521014fe44b --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/build.gradle @@ -0,0 +1,22 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright Contributors to the ODPi Egeria project. + */ + + +dependencies { + implementation project(':open-metadata-implementation:user-security:token-controller') + implementation project(':open-metadata-implementation:view-services:automated-curation:automated-curation-server') + implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-api') + implementation project(':open-metadata-implementation:frameworks:governance-action-framework') + implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-api') + implementation project(':open-metadata-implementation:common-services:ffdc-services') + implementation 'org.springframework:spring-web' + implementation 'io.swagger.core.v3:swagger-annotations' + compileOnly 'com.fasterxml.jackson.core:jackson-annotations' + +} + +java { + withJavadocJar() +} diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java new file mode 100644 index 00000000000..0b75bb3f7da --- /dev/null +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java @@ -0,0 +1,1024 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project */ +package org.odpi.openmetadata.viewservices.automatedcuration.server.spring; + +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessStepProperties; +import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionTypeProperties; +import org.odpi.openmetadata.frameworkservices.gaf.rest.*; +import org.odpi.openmetadata.viewservices.automatedcuration.server.AutomatedCurationRESTServices; +import org.springframework.web.bind.annotation.*; + + +/** + * The AutomatedCurationResource provides the Spring API endpoints of the Automated Curation Open Metadata View Service (OMVS). + * This interface provides a service for Egeria UIs. + */ + +@RestController +@RequestMapping("/servers/{serverName}/api/open-metadata/automated-curation") + +@Tag(name="API: Automated Curation OMVS", + description="Set up and maintain automation services in Egeria.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/services/omvs/automated-curation/overview/")) + +public class AutomatedCurationResource +{ + + private final AutomatedCurationRESTServices restAPI = new AutomatedCurationRESTServices(); + + + /** + * Default constructor + */ + public AutomatedCurationResource() + { + } + + + + + /* ===================================================================================================================== + * A governance action type describes a template to invoke a governance service in a governance engine. + */ + + /** + * Create a new metadata element to represent a governance action type. + * + * @param serverName name of the service to route the request to + * @param requestBody properties about the process to store + * + * @return unique identifier of the new governance action type 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) + */ + @PostMapping(path = "/governance-action-types/new") + @Operation(summary="createGovernanceActionType", + description="Create a new metadata element to represent a governance action type.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-type")) + + public GUIDResponse createGovernanceActionType(@PathVariable String serverName, + @RequestBody GovernanceActionTypeProperties requestBody) + { + return restAPI.createGovernanceActionType(serverName, requestBody); + } + + + /** + * Update the metadata element representing a governance action type. + * + * @param serverName name of the service to route the request to + * @param governanceActionTypeGUID unique identifier of the metadata element to update + * @param requestBody new properties for the metadata element + * + * @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) + */ + @PostMapping(path = "/governance-action-types/{governanceActionTypeGUID}/update") + @Operation(summary="updateGovernanceActionType", + description="Create a new metadata element to represent a governance action type.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-type")) + + public VoidResponse updateGovernanceActionType(@PathVariable String serverName, + @PathVariable String governanceActionTypeGUID, + @RequestBody UpdateGovernanceActionTypeRequestBody requestBody) + { + return restAPI.updateGovernanceActionType(serverName,governanceActionTypeGUID, requestBody); + } + + + /** + * Remove the metadata element representing a governance action type. + * + * @param serverName name of the service to route the request to + * @param governanceActionTypeGUID unique identifier of the metadata element to remove + * @param requestBody null request body + * + * @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) + */ + @PostMapping(path = "/governance-action-types/{governanceActionTypeGUID}/remove") + @Operation(summary="removeGovernanceActionType", + description="Remove the metadata element representing a governance action type.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-type")) + + public VoidResponse removeGovernanceActionType(@PathVariable String serverName, + @PathVariable String governanceActionTypeGUID, + @RequestBody (required = false) NullRequestBody requestBody) + { + return restAPI.removeGovernanceActionType(serverName, governanceActionTypeGUID, requestBody); + } + + + /** + * Retrieve the list of governance action type metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param serverName name of the service to route the request to + * @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 startFrom paging start point + * @param pageSize maximum results that can be returned + * @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) + */ + @PostMapping(path = "/governance-action-types/by-search-string") + @Operation(summary="findGovernanceActionTypes", + description="Retrieve the list of governance action type metadata elements that contain the search string. The search string is treated as a regular expression.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-type")) + + public GovernanceActionTypesResponse findGovernanceActionTypes(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestParam (required = false, defaultValue = "false") + boolean startsWith, + @RequestParam (required = false, defaultValue = "false") + boolean endsWith, + @RequestParam (required = false, defaultValue = "false") + boolean ignoreCase, + @RequestBody StringRequestBody requestBody) + { + return restAPI.findGovernanceActionTypes(serverName, startsWith, endsWith, ignoreCase, startFrom, pageSize, requestBody); + } + + + /** + * Retrieve the list of governance action type metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param serverName name of the service to route the request to + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * @param requestBody name to search for + * + * @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) + */ + @PostMapping(path = "/governance-action-types/by-name") + @Operation(summary="getGovernanceActionTypesByName", + description="Retrieve the list of governance action type metadata elements with a matching qualified or display name. There are no wildcards supported on this request.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-type")) + + public GovernanceActionTypesResponse getGovernanceActionTypesByName(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody StringRequestBody requestBody) + { + return restAPI.getGovernanceActionTypesByName(serverName, startFrom, pageSize, requestBody); + } + + + /** + * Retrieve the governance action type metadata element with the supplied unique identifier. + * + * @param serverName name of the service to route the request to + * @param governanceActionTypeGUID unique identifier of the governance action type + * + * @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) + */ + @GetMapping(path = "/governance-action-types/{governanceActionTypeGUID}") + @Operation(summary="getGovernanceActionTypeByGUID", + description="Retrieve the governance action type metadata element with the supplied unique identifier.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-type")) + + public GovernanceActionTypeResponse getGovernanceActionTypeByGUID(@PathVariable String serverName, + @PathVariable String governanceActionTypeGUID) + { + return restAPI.getGovernanceActionTypeByGUID(serverName, governanceActionTypeGUID); + } + + + /* ===================================================================================================================== + * A governance action process describes a well-defined series of steps that gets something done. + * The steps are defined using GovernanceActionTypes. + */ + + /** + * Create a new metadata element to represent a governance action process. + * + * @param serverName name of the service to route the request to + * @param requestBody properties about the process to store and status value for the new process (default = ACTIVE) + * + * @return unique identifier of the new process 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) + */ + @PostMapping(path = "/governance-action-processes/new") + @Operation(summary="createGovernanceActionProcess", + description="Create a new metadata element to represent a governance action process.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GUIDResponse createGovernanceActionProcess(@PathVariable String serverName, + @RequestBody NewGovernanceActionProcessRequestBody requestBody) + { + return restAPI.createGovernanceActionProcess(serverName, requestBody); + } + + + + /** + * Update the metadata element representing a governance action process. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the metadata element to update + * @param requestBody new properties for the metadata element + * + * @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) + */ + @PostMapping(path = "/governance-action-processes/{processGUID}/update") + @Operation(summary="updateGovernanceActionProcess", + description="Update the metadata element representing a governance action process.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public VoidResponse updateGovernanceActionProcess(@PathVariable String serverName, + @PathVariable String processGUID, + @RequestBody UpdateGovernanceActionProcessRequestBody requestBody) + { + return restAPI.updateGovernanceActionProcess(serverName, processGUID, requestBody); + } + + + /** + * Update the zones for the governance action process (asset) so that it becomes visible to consumers. + * (The zones are set to the list of zones in the publishedZones option configured for each + * instance of an Open Metadata AccessService (OMAS)). + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the metadata element to publish + * @param requestBody null request body + * + * @return + * 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) + */ + @PostMapping(path = "/governance-action-processes/{processGUID}/publish") + @Operation(summary="publishGovernanceActionProcess", + description="Update the zones for the governance action process (asset) so that it becomes visible to consumers. (The zones are set to the list of zones in the publishedZones option configured for each instance of an Open Metadata Access Service (OMAS)).", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-zone")) + + public VoidResponse publishGovernanceActionProcess(@PathVariable String serverName, + @PathVariable String processGUID, + @RequestBody (required = false) NullRequestBody requestBody) + { + return restAPI.publishGovernanceActionProcess(serverName, processGUID, requestBody); + } + + + /** + * Update the zones for the asset so that it is no longer visible to consumers. + * (The zones are set to the list of zones in the defaultZones option configured for each + * instance of an Open Metadata AccessService (OMAS). This is also the setting for the zones when the process is first created.) + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the metadata element to withdraw + * @param requestBody null request body + * + * @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) + */ + @PostMapping(path = "/governance-action-processes/{processGUID}/withdraw") + @Operation(summary="withdrawGovernanceActionProcess", + description="Update the zones for the governance action process (asset) so that it is no longer visible to consumers. (The zones are set to the list of zones in the defaultZones option configured for each instance of an Open Metadata Access Service (OMAS). This is also the setting for the zones when the process is first created.)", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-zone")) + public VoidResponse withdrawGovernanceActionProcess(@PathVariable String serverName, + @PathVariable String processGUID, + @RequestBody (required = false) NullRequestBody requestBody) + { + return restAPI.withdrawGovernanceActionProcess(serverName, processGUID, requestBody); + } + + + /** + * Remove the metadata element representing a governance action process. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the metadata element to remove + * @param requestBody null request body + * + * @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) + */ + @PostMapping(path = "/governance-action-processes/{processGUID}/remove") + @Operation(summary="removeGovernanceActionProcess", + description="Remove the metadata element representing a governance action process.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public VoidResponse removeGovernanceActionProcess(@PathVariable String serverName, + @PathVariable String processGUID, + @RequestBody (required = false) NullRequestBody requestBody) + { + return restAPI.removeGovernanceActionProcess(serverName, processGUID, requestBody); + } + + + /** + * Retrieve the list of governance action process metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param serverName name of the service to route the request to + * @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 startFrom paging start point + * @param pageSize maximum results that can be returned + * @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) + */ + @PostMapping(path = "/governance-action-processes/by-search-string") + @Operation(summary="findGovernanceActionProcesses", + description="Retrieve the list of governance action process metadata elements that contain the search string. The search string is treated as a regular expression.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GovernanceActionProcessElementsResponse findGovernanceActionProcesses(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestParam (required = false, defaultValue = "false") + boolean startsWith, + @RequestParam (required = false, defaultValue = "false") + boolean endsWith, + @RequestParam (required = false, defaultValue = "false") + boolean ignoreCase, + @RequestBody StringRequestBody requestBody) + { + return restAPI.findGovernanceActionProcesses(serverName, startsWith, endsWith, ignoreCase, startFrom, pageSize, requestBody); + } + + + + /** + * Retrieve the list of governance action process metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param serverName name of the service to route the request to + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * @param requestBody name to search for + * + * @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) + */ + @PostMapping(path = "/governance-action-processes/by-name") + @Operation(summary="getGovernanceActionProcessesByName", + description="Retrieve the list of governance action process metadata elements with a matching qualified or display name. There are no wildcards supported on this request.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GovernanceActionProcessElementsResponse getGovernanceActionProcessesByName(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody StringRequestBody requestBody) + { + return restAPI.getGovernanceActionProcessesByName(serverName, startFrom, pageSize, requestBody); + } + + + /** + * Retrieve the governance action process metadata element with the supplied unique identifier. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the requested metadata element + * + * @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) + */ + @GetMapping(path = "/governance-action-processes/{processGUID}") + @Operation(summary="getGovernanceActionProcessByGUID", + description="Retrieve the governance action process metadata element with the supplied unique identifier.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GovernanceActionProcessElementResponse getGovernanceActionProcessByGUID(@PathVariable String serverName, + @PathVariable String processGUID) + { + return restAPI.getGovernanceActionProcessByGUID(serverName, processGUID); + } + + + /* ===================================================================================================================== + * A governance action process step describes a step in a governance action process + */ + + /** + * Create a new metadata element to represent a governance action process step. + * + * @param serverName name of the service to route the request to + * @param requestBody properties about the process to store + * + * @return unique identifier of the new governance action process step 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) + */ + @PostMapping(path = "/governance-action-process-steps/new") + @Operation(summary="createGovernanceActionProcessStep", + description="Create a new metadata element to represent a governance action process step.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GUIDResponse createGovernanceActionProcessStep(@PathVariable String serverName, + @RequestBody GovernanceActionProcessStepProperties requestBody) + { + return restAPI.createGovernanceActionProcessStep(serverName, requestBody); + } + + + /** + * Update the metadata element representing a governance action process step. + * + * @param serverName name of the service to route the request to + * @param governanceActionTypeGUID unique identifier of the metadata element to update + * @param requestBody new properties for the metadata element + * + * @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) + */ + @PostMapping(path = "/governance-action-process-steps/{governanceActionTypeGUID}/update") + @Operation(summary="updateGovernanceActionProcessStep", + description="Create a new metadata element to represent a governance action process step.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public VoidResponse updateGovernanceActionProcessStep(@PathVariable String serverName, + @PathVariable String governanceActionTypeGUID, + @RequestBody UpdateGovernanceActionProcessStepRequestBody requestBody) + { + return restAPI.updateGovernanceActionProcessStep(serverName, governanceActionTypeGUID, requestBody); + } + + + /** + * Remove the metadata element representing a governance action process step. + * + * @param serverName name of the service to route the request to + * @param processStepGUID unique identifier of the metadata element to remove + * @param requestBody null request body + * + * @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) + */ + @PostMapping(path = "/governance-action-process-steps/{processStepGUID}/remove") + @Operation(summary="removeGovernanceActionProcessStep", + description="Remove the metadata element representing a governance action process step.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public VoidResponse removeGovernanceActionProcessStep(@PathVariable String serverName, + @PathVariable String processStepGUID, + @RequestBody (required = false) NullRequestBody requestBody) + { + return restAPI.removeGovernanceActionProcessStep(serverName, processStepGUID, requestBody); + } + + + /** + * Retrieve the list of governance action process step metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param serverName name of the service to route the request to + * @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 startFrom paging start point + * @param pageSize maximum results that can be returned + * @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) + */ + @PostMapping(path = "/governance-action-process-steps/by-search-string") + @Operation(summary="findGovernanceActionProcessSteps", + description="Retrieve the list of governance action process step metadata elements that contain the search string. The search string is treated as a regular expression.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GovernanceActionProcessStepsResponse findGovernanceActionProcessSteps(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestParam (required = false, defaultValue = "false") + boolean startsWith, + @RequestParam (required = false, defaultValue = "false") + boolean endsWith, + @RequestParam (required = false, defaultValue = "false") + boolean ignoreCase, + @RequestBody StringRequestBody requestBody) + { + return restAPI.findGovernanceActionProcessSteps(serverName, startsWith, endsWith, ignoreCase, startFrom, pageSize, requestBody); + } + + + /** + * Retrieve the list of governance action process step metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param serverName name of the service to route the request to + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * @param requestBody name to search for + * + * @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) + */ + @PostMapping(path = "/governance-action-process-steps/by-name") + @Operation(summary="getGovernanceActionProcessStepsByName", + description="Retrieve the list of governance action process step metadata elements with a matching qualified or display name. There are no wildcards supported on this request.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GovernanceActionProcessStepsResponse getGovernanceActionProcessStepsByName(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody StringRequestBody requestBody) + { + return restAPI.getGovernanceActionProcessStepsByName(serverName, startFrom, pageSize, requestBody); + } + + + /** + * Retrieve the governance action process step metadata element with the supplied unique identifier. + * + * @param serverName name of the service to route the request to + * @param processStepGUID unique identifier of the governance action process step + * + * @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) + */ + @GetMapping(path = "/governance-action-process-steps/{processStepGUID}") + @Operation(summary="getGovernanceActionProcessStepByGUID", + description="Retrieve the governance action process step metadata element with the supplied unique identifier.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GovernanceActionProcessStepResponse getGovernanceActionProcessStepByGUID(@PathVariable String serverName, + @PathVariable String processStepGUID) + { + return restAPI.getGovernanceActionProcessStepByGUID(serverName, processStepGUID); + } + + + /** + * Set up a link between a governance action process and a governance action process step. This defines the first + * step in the process. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the governance action process + * @param processStepGUID unique identifier of the governance action process step + * @param requestBody optional guard + * + * @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) + */ + @PostMapping(path = "/governance-action-processes/{processGUID}/first-process-step/{processStepGUID}/new") + @Operation(summary="setupFirstActionProcessStep", + description="Set up a link between a governance action process and a governance action process step. This defines the first step in the process.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public VoidResponse setupFirstActionProcessStep(@PathVariable String serverName, + @PathVariable String processGUID, + @PathVariable String processStepGUID, + @RequestBody (required = false) String requestBody) + { + return restAPI.setupFirstActionProcessStep(serverName, processGUID, processStepGUID, requestBody); + } + + + /** + * Return the governance action process step that is the first step in a governance action process. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the governance action process + * + * @return properties of the governance action process step 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) + */ + @GetMapping(path = "/governance-action-processes/{processGUID}/first-process-step") + @Operation(summary="getFirstActionProcessStep", + description="Return the governance action process step that is the first step in a governance action process.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GovernanceActionProcessStepResponse getFirstActionProcessStep(@PathVariable String serverName, + @PathVariable String processGUID) + { + return restAPI.getFirstActionProcessStep(serverName, processGUID); + } + + + /** + * Remove the link between a governance process and that governance action process step that defines its first step. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the governance action process + * @param requestBody null request body + * + * @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) + */ + @PostMapping(path = "/governance-action-processes/{processGUID}/first-process-step/remove") + @Operation(summary="removeFirstActionProcessStep", + description="Remove the link between a governance process and that governance action process step that defines its first step.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public VoidResponse removeFirstProcessStep(@PathVariable String serverName, + @PathVariable String processGUID, + @RequestBody (required = false) NullRequestBody requestBody) + { + return restAPI.removeFirstProcessStep(serverName, processGUID, requestBody); + } + + + + /** + * Add a link between two governance action process steps to show that one follows on from the other when a governance action process + * is executing. + * + * @param serverName name of the service to route the request to + * @param currentProcessStepGUID unique identifier of the governance action process step that defines the previous step in the governance action process + * @param nextProcessStepGUID unique identifier of the governance action process step that defines the next step in the governance action process + * @param requestBody guard required for this next step to proceed - or null for always run the next step plus flags. + * + * @return unique identifier of the new link 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) + */ + @PostMapping(path = "/governance-action-process-steps/{currentProcessStepGUID}/next-process-steps/{nextProcessStepGUID}/new") + @Operation(summary="removeFirstActionProcessStep", + description="Remove the link between a governance process and that governance action process step that defines its first step.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GUIDResponse setupNextActionProcessStep(@PathVariable String serverName, + @PathVariable String currentProcessStepGUID, + @PathVariable String nextProcessStepGUID, + @RequestBody NextGovernanceActionProcessStepRequestBody requestBody) + { + return restAPI.setupNextActionProcessStep(serverName, currentProcessStepGUID, nextProcessStepGUID, requestBody); + } + + + /** + * Update the properties of the link between two governance action process steps that shows that one follows on from the other when a governance + * action process is executing. + * + * @param serverName name of the service to route the request to + * @param nextProcessStepLinkGUID unique identifier of the relationship between the governance action process steps + * @param requestBody guard required for this next step to proceed - or null for always run the next step - and flags + * + * @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) + */ + @PostMapping(path = "/governance-action-process-steps/next-process-steps/{nextProcessStepLinkGUID}/update") + @Operation(summary="updateNextActionProcessStep", + description="Update the properties of the link between two governance action process steps that shows that one follows on from the other when a governance action process is executing.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public VoidResponse updateNextActionProcessStep(@PathVariable String serverName, + @PathVariable String nextProcessStepLinkGUID, + @RequestBody NextGovernanceActionProcessStepRequestBody requestBody) + { + return restAPI.updateNextActionProcessStep(serverName, nextProcessStepLinkGUID, requestBody); + } + + + /** + * Return the list of next process steps defined for the governance action process. + * + * @param serverName name of the service to route the request to + * @param processStepGUID unique identifier of the current governance action process step + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return return the list of relationships and attached governance action process step 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) + */ + @GetMapping(path = "/governance-action-process-steps/{processStepGUID}/next-process-steps") + @Operation(summary="getNextProcessSteps", + description="Return the list of next process steps defined for the governance action process.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public NextGovernanceActionProcessStepsResponse getNextProcessSteps(@PathVariable String serverName, + @PathVariable String processStepGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) + { + return restAPI.getNextProcessSteps(serverName, processStepGUID, startFrom, pageSize); + } + + + /** + * Remove a follow-on step from a governance action process. + * + * @param serverName name of the service to route the request to + * @param relationshipGUID unique identifier of the relationship between the governance action process steps + * @param requestBody null request body + * + * @return void or + * InvalidParameterException one of the parameters is invalid or + * UserNotAuthorizedException the user is not authorized to issue this request or + * PropertyServerException there is a problem reported in the open metadata server(s) + */ + @PostMapping(path = "/governance-action-process-steps/next-process-step/{relationshipGUID}/remove") + @Operation(summary="removeNextActionProcessStep", + description="Remove a follow-on step from a governance action process.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public VoidResponse removeNextActionProcessStep(@PathVariable String serverName, + @PathVariable String relationshipGUID, + @RequestBody (required = false) NullRequestBody requestBody) + { + return restAPI.removeNextActionProcessStep(serverName, relationshipGUID, requestBody); + } + + + /** + * Create an engine action in the metadata store that will trigger the governance service + * associated with the supplied request type. The engine action remains to act as a record + * of the actions taken for auditing. + * + * @param serverName name of server instance to route request to + * @param governanceEngineName name of the governance engine that should execute the request + * @param requestBody properties for the engine action and to pass to the governance service + * + * @return unique identifier of the engine action or + * InvalidParameterException null qualified name + * UserNotAuthorizedException the caller is not authorized to create an engine action + * PropertyServerException there is a problem with the metadata store + */ + @PostMapping(path = "/governance-engines/{governanceEngineName}/engine-actions/initiate") + @Operation(summary="initiateEngineAction", + description="Create an engine action in the metadata store that will trigger the governance service associated with the supplied request type. The engine action remains to act as a record of the actions taken for auditing.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/engine-action")) + + public GUIDResponse initiateEngineAction(@PathVariable String serverName, + @PathVariable String governanceEngineName, + @RequestBody EngineActionRequestBody requestBody) + { + return restAPI.initiateEngineAction(serverName, governanceEngineName, requestBody); + } + + + /** + * Using the named governance action process as a template, initiate a chain of engine actions. + * + * @param serverName name of server instance to route request to + * @param requestBody properties to initiate the new instance of the engine action + * + * @return unique identifier of the first engine action of the process or + * InvalidParameterException null or unrecognized qualified name of the process + * UserNotAuthorizedException the caller is not authorized to create a governance action process + * PropertyServerException there is a problem with the metadata store + */ + @PostMapping(path = "/governance-action-types/initiate") + @Operation(summary="initiateGovernanceActionType", + description="Using the named governance action type as a template, initiate an engine action.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-type")) + + public GUIDResponse initiateGovernanceActionType(@PathVariable String serverName, + @RequestBody GovernanceActionTypeRequestBody requestBody) + { + return restAPI.initiateGovernanceActionType(serverName, requestBody); + } + + + /** + * Using the named governance action process as a template, initiate a chain of engine actions. + * + * @param serverName name of server instance to route request to + * @param requestBody properties to initiate the new instance of the process + * + * @return unique identifier of the first engine action of the process or + * InvalidParameterException null or unrecognized qualified name of the process + * UserNotAuthorizedException the caller is not authorized to create a governance action process + * PropertyServerException there is a problem with the metadata store + */ + @PostMapping(path = "/governance-action-processes/initiate") + @Operation(summary="initiateGovernanceActionProcess", + description="Using the named governance action process as a template, initiate a chain of engine actions.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GUIDResponse initiateGovernanceActionProcess(@PathVariable String serverName, + @RequestBody GovernanceActionProcessRequestBody requestBody) + { + return restAPI.initiateGovernanceActionProcess(serverName, requestBody); + } + + + /** + * Request the status and properties of an executing engine action request. + * + * @param serverName name of server instance to route request to + * @param engineActionGUID identifier of the engine action request. + * + * @return engine action properties and status or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + @GetMapping(path = "/engine-actions/{engineActionGUID}") + @Operation(summary="getEngineAction", + description="Request the status and properties of an executing engine action request.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/engine-action")) + + public EngineActionElementResponse getEngineAction(@PathVariable String serverName, + @PathVariable String engineActionGUID) + { + return restAPI.getEngineAction(serverName, engineActionGUID); + } + + + /** + * Retrieve the engine actions that are known to the server. + * + * @param serverName name of server instance to route request to + * @param startFrom starting from element + * @param pageSize maximum elements to return + * + * @return list of engine action elements or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + @GetMapping(path = "/engine-actions") + @Operation(summary="getEngineActions", + description="Retrieve the engine actions that are known to the server.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/engine-action")) + + public EngineActionElementsResponse getEngineActions(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize) + { + return restAPI.getEngineActions(serverName, startFrom, pageSize); + } + + + /** + * Retrieve the engine actions that are still in process. + * + * @param serverName name of server instance to route request to + * @param startFrom starting from element + * @param pageSize maximum elements to return + * + * @return list of engine action elements or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + @GetMapping(path = "/engine-actions/active") + @Operation(summary="getActiveEngineActions", + description="Retrieve the engine actions that are still in process.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/engine-action")) + + public EngineActionElementsResponse getActiveEngineActions(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize) + { + return restAPI.getActiveEngineActions(serverName, startFrom, pageSize); + } + + + /** + * Retrieve the list of engine action metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param serverName name of the service to route the request to + * @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 startFrom paging start point + * @param pageSize maximum results that can be returned + * @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) + */ + @PostMapping(path = "/engine-actions/by-search-string") + @Operation(summary="findEngineActions", + description="Retrieve the list of engine action metadata elements that contain the search string. The search string is treated as a regular expression.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/engine-action")) + + public EngineActionElementsResponse findEngineActions(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestParam (required = false, defaultValue = "false") + boolean startsWith, + @RequestParam (required = false, defaultValue = "false") + boolean endsWith, + @RequestParam (required = false, defaultValue = "false") + boolean ignoreCase, + @RequestBody StringRequestBody requestBody) + { + return restAPI.findEngineActions(serverName, startsWith, endsWith, ignoreCase, startFrom, pageSize, requestBody); + } + + + /** + * Retrieve the list of engine action metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param serverName name of the service to route the request to + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * @param requestBody name to search for + * + * @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) + */ + @PostMapping(path = "/engine-actions/by-name") + @Operation(summary="getEngineActionsByName", + description="Retrieve the list of engine action metadata elements with a matching qualified or display name. There are no wildcards supported on this request.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/engine-action")) + + public EngineActionElementsResponse getEngineActionsByName(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody StringRequestBody requestBody) + { + return restAPI.getEngineActionsByName(serverName, startFrom, pageSize, requestBody); + } +} + diff --git a/open-metadata-implementation/view-services/collection-manager/README.md b/open-metadata-implementation/view-services/collection-manager/README.md index dac38d629cb..cdd4dc0aef1 100644 --- a/open-metadata-implementation/view-services/collection-manager/README.md +++ b/open-metadata-implementation/view-services/collection-manager/README.md @@ -1,7 +1,7 @@ -![Technical Preview](../../../images/egeria-content-status-tech-preview.png) +![InDev](../../../images/egeria-content-status-in-development.png#pagewidth) # Collection Manager OMVS diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/CollectionManagerRESTServices.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/CollectionManagerRESTServices.java index d9c1f48f8af..4f78c33a8e1 100644 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/CollectionManagerRESTServices.java +++ b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/CollectionManagerRESTServices.java @@ -11,7 +11,6 @@ /** * The CollectionManagerRESTServices provides the implementation of the Collection Manager Open Metadata View Service (OMVS). - * This interface provides view interfaces for glossary UIs. */ public class CollectionManagerRESTServices extends TokenController diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/spring/CollectionManagerResource.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/spring/CollectionManagerResource.java index c7585220b63..dcc2c8bbb90 100644 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/spring/CollectionManagerResource.java +++ b/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/spring/CollectionManagerResource.java @@ -15,11 +15,11 @@ */ @RestController -@RequestMapping("/servers/{serverName}/api/open-metadata/glossary-browser") +@RequestMapping("/servers/{serverName}/api/open-metadata/collection-manager") @Tag(name="API: Collection Manager OMVS", description="Maintain and explore the contents of nested collections. These collections can be used to represent digital products, or collections of resources for a particular project or team. They can be used to organize assets and other resources into logical groups.", - externalDocs=@ExternalDocumentation(description="Further Information",url="https://egeria-project.org/services/omvs/glossary-browser/overview/")) + externalDocs=@ExternalDocumentation(description="Further Information",url="https://egeria-project.org/services/omvs/collection-manager/overview/")) public class CollectionManagerResource { diff --git a/open-metadata-implementation/view-services/my-profile/Egeria-my-profile-view-service.http b/open-metadata-implementation/view-services/my-profile/Egeria-my-profile-omvs.http similarity index 100% rename from open-metadata-implementation/view-services/my-profile/Egeria-my-profile-view-service.http rename to open-metadata-implementation/view-services/my-profile/Egeria-my-profile-omvs.http diff --git a/open-metadata-implementation/view-services/my-profile/Egeria-my-profile-view-service.postman_collection.json b/open-metadata-implementation/view-services/my-profile/Egeria-my-profile-view-service.postman_collection.json deleted file mode 100644 index 134a9d99553..00000000000 --- a/open-metadata-implementation/view-services/my-profile/Egeria-my-profile-view-service.postman_collection.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "info": { - "_postman_id": "1dfc1963-3a13-4eaf-860c-fe37b400ede2", - "name": "Egeria-my-profile-view-service", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "28623075" - }, - "item": [ - { - "name": "Get My Profile", - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "eyJraWQiOiI3Zjk3OGY4OC02ZmFmLTRmODYtYTllZi0wNjE1ZTM2NjVlYWIiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJwZXRlcnByb2ZpbGUiLCJzY29wZSI6WyJDT0NPX1BIQVJNQV9VU0VSIiwiQ09DT19QSEFSTUFfQURNSU4iXSwiaXNzIjoic2VsZiIsInZpc2libGVDb21wb25lbnRzIjpbImFzc2V0LWNhdGFsb2ciLCJ2ZXJ0aWNhbC1saW5lYWdlIiwiYXNzZXQtbGluZWFnZSIsImFib3V0IiwiZW5kLXRvLWVuZCIsIioiLCJyZXBvc2l0b3J5LWV4cGxvcmVyIiwiYXNzZXQtbGluZWFnZS1wcmludCIsImdsb3NzYXJ5IiwidWx0aW1hdGUtZGVzdGluYXRpb24iLCJhc3NldC1kZXRhaWxzIiwidWx0aW1hdGUtc291cmNlIiwiYXNzZXQtZGV0YWlscy1wcmludCJdLCJleHAiOjE2OTk0NTAwNTAsImlhdCI6MTY5OTQ0NjQ1MH0.dVZw4OHr94ffr5xTR3XCMrGM-599Rp5x8p0LiwSH8FS9WmFfI_pFVwNs27sSJuEP9CwjwEdtexmWjt4wtT-pdPGshhzpe2U_xJ1zQmYzIcfkKUSSJZhOgIsxRqrlKGoUkVUrtUWyMnPjzg5IvCnjWkGUWOgiy7PwDat-lg2L42T5oHDPY3mLu1wFONKpa3oCncIKDC8gOsB_T9S4vJGZBCxap6pEYyhlk1VMgEcGBk_G6tTMg6KAO4MwNJWIr5Ot2YmiMIhnJAOz9EFvMCzerKQcqX5IwrMJ-SqnbwudiTOa1MbkV8ELRD1u6RstciSbclmjvMBKJ_YAjr5bwvylbA", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{baseURL}}/servers/{{server}}/api/open-metadata/my-profile", - "host": [ - "{{baseURL}}" - ], - "path": [ - "servers", - "{{server}}", - "api", - "open-metadata", - "my-profile" - ] - } - }, - "response": [] - } - ] -} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index f189c00d0af..655d0f5568c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -251,6 +251,8 @@ include(':open-metadata-implementation:view-services:dino-view:dino-view-server' include(':open-metadata-implementation:view-services:dino-view:dino-view-spring') include(':open-metadata-implementation:view-services:asset-catalog:asset-catalog-server') include(':open-metadata-implementation:view-services:asset-catalog:asset-catalog-spring') +include(':open-metadata-implementation:view-services:automated-curation:automated-curation-server') +include(':open-metadata-implementation:view-services:automated-curation:automated-curation-spring') include(':open-metadata-implementation:view-services:collection-manager:collection-manager-server') include(':open-metadata-implementation:view-services:collection-manager:collection-manager-spring') include(':open-metadata-implementation:view-services:glossary-browser:glossary-browser-server')