Skip to content

Commit 30475a7

Browse files
Merge pull request #8856 from mandy-chessell/oak2025
Update Automated Curation OMVS
2 parents e3a852c + 1a02d52 commit 30475a7

File tree

32 files changed

+1802
-1740
lines changed

32 files changed

+1802
-1740
lines changed

open-metadata-implementation/access-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/EgeriaOpenGovernanceClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
/**
99
* EgeriaOpenGovernanceClient provides an interface to the services that build, monitor and trigger governance actions.
10-
* This is part of the Open Survey Framework (OGF).
10+
* This is part of the Open Governance Framework (OGF).
1111
*/
1212
public class EgeriaOpenGovernanceClient extends OpenGovernanceClientBase
1313
{

open-metadata-implementation/access-services/omf-metadata-management/omf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/omf/client/EgeriaOpenMetadataStoreClient.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
/* Copyright Contributors to the ODPi Egeria project. */
33
package org.odpi.openmetadata.frameworkservices.omf.client;
44

5-
import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription;
65
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException;
76

87
/**
9-
* EgeriaOpenMetadataStoreClient provides an interface to the open metadata store. This is part of the Open Survey Framework (OGF)
8+
* EgeriaOpenMetadataStoreClient provides an interface to the open metadata store. This is part of the Open Metadata Framework (OMF)
109
* and provides a comprehensive interface for working with all types of metadata, subject to the user's (and this OMAS's) security permissions.
1110
* The interface supports search, maintenance of metadata elements, classifications and relationships plus the ability to raise incident reports
1211
* and todos along with the ability to work with metadata valid values and translations.
1312
*/
1413
public class EgeriaOpenMetadataStoreClient extends OpenMetadataClientBase
1514
{
16-
private final static String serviceURLMarker = AccessServiceDescription.OMF_METADATA_MANAGEMENT.getServiceURLMarker();
17-
1815
/**
1916
* Create a new client with no authentication embedded in the HTTP request.
2017
*

open-metadata-implementation/access-services/omf-metadata-management/omf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/omf/client/handlers/EgeriaOpenMetadataStoreHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.odpi.openmetadata.frameworkservices.omf.client.OpenMetadataClientBase;
77

88
/**
9-
* OpenMetadataClient provides an interface to the open metadata store. This is part of the Open Survey Framework (OGF)
9+
* OpenMetadataClient provides an interface to the open metadata store. This is part of the Open Metadata Framework (OMF)
1010
* and provides a comprehensive interface for working with all types of metadata, subject to the user's (and this OMAS's) security permissions.
1111
* The interface supports search, maintenance of metadata elements, classifications and relationships plus the ability to raise incident reports
1212
* and todos along with the ability to work with metadata valid values and translations.

open-metadata-implementation/access-services/omf-metadata-management/omf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/omf/handlers/MetadataElementHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ public List<OpenMetadataRelationship> getMetadataElementRelationships(String
778778
public List<B> findMetadataElements(String userId,
779779
String metadataElementTypeName,
780780
List<String> metadataElementSubtypeName,
781-
SearchProperties searchProperties,
781+
SearchProperties searchProperties,
782782
List<ElementStatus> limitResultsByStatus,
783783
SearchClassifications searchClassifications,
784784
Date asOfTime,

open-metadata-implementation/common-services/multi-tenant/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ dependencies {
2424
implementation project(':open-metadata-implementation:governance-server-services:integration-daemon-services:integration-daemon-services-api')
2525
implementation project(':open-metadata-implementation:access-services:omf-metadata-management:omf-metadata-api')
2626
implementation project(':open-metadata-implementation:access-services:omf-metadata-management:omf-metadata-client')
27+
implementation project(':open-metadata-implementation:access-services:gaf-metadata-management:gaf-metadata-api')
28+
implementation project(':open-metadata-implementation:access-services:gaf-metadata-management:gaf-metadata-client')
2729
testImplementation 'org.testng:testng'
2830
compileOnly 'com.fasterxml.jackson.core:jackson-annotations'
2931
}

open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/ViewServiceClientMap.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import org.odpi.openmetadata.frameworks.openmetadata.client.OpenMetadataClient;
1212
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException;
1313
import org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException;
14+
import org.odpi.openmetadata.frameworkservices.gaf.client.EgeriaOpenGovernanceClient;
1415
import org.odpi.openmetadata.frameworkservices.omf.client.handlers.EgeriaOpenMetadataStoreHandler;
1516

1617
import java.lang.reflect.Constructor;
@@ -156,12 +157,17 @@ private B createViewServiceClient(ViewServiceConfig viewServiceConfig,
156157
B viewServiceClient = null;
157158

158159
EgeriaOpenMetadataStoreHandler openMetadataClient;
160+
EgeriaOpenGovernanceClient openGovernanceClient;
159161
if (localServerUserPassword == null)
160162
{
161163
openMetadataClient = new EgeriaOpenMetadataStoreHandler(viewServiceConfig.getOMAGServerName(),
162164
viewServiceConfig.getOMAGServerPlatformRootURL(),
163165
maxPageSize);
164166

167+
openGovernanceClient = new EgeriaOpenGovernanceClient(viewServiceConfig.getOMAGServerName(),
168+
viewServiceConfig.getOMAGServerPlatformRootURL(),
169+
maxPageSize);
170+
165171
}
166172
else
167173
{
@@ -170,6 +176,12 @@ private B createViewServiceClient(ViewServiceConfig viewServiceConfig,
170176
localServerUserId,
171177
localServerUserPassword,
172178
maxPageSize);
179+
180+
openGovernanceClient = new EgeriaOpenGovernanceClient(viewServiceConfig.getOMAGServerName(),
181+
viewServiceConfig.getOMAGServerPlatformRootURL(),
182+
localServerUserId,
183+
localServerUserPassword,
184+
maxPageSize);
173185
}
174186

175187
try
@@ -178,6 +190,10 @@ private B createViewServiceClient(ViewServiceConfig viewServiceConfig,
178190
{
179191
viewServiceClient = handlerClass.cast(openMetadataClient);
180192
}
193+
else if (handlerClass.isInstance(openGovernanceClient))
194+
{
195+
viewServiceClient = handlerClass.cast(openGovernanceClient);
196+
}
181197
else
182198
{
183199
/*

open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/handlers/AssetHandler.java

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.actions.ActionProperties;
2424
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.actions.ActionRequesterProperties;
2525
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.actions.ActionTargetProperties;
26+
import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.connectors.CatalogTargetProperties;
2627
import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.LineageRelationshipProperties;
2728
import org.odpi.openmetadata.frameworks.openmetadata.refdata.AssignmentType;
2829
import org.odpi.openmetadata.frameworks.openmetadata.search.*;
@@ -555,6 +556,189 @@ public void detachDataSetContent(String userId,
555556
}
556557

557558

559+
/**
560+
* Add an element to an integration connector's workload.
561+
*
562+
* @param userId userId of user making request.
563+
* @param integrationConnectorGUID unique identifier of the integration connector.
564+
* @param metadataSourceOptions options to control access to open metadata
565+
* @param catalogTargetProperties properties describing the relationship characteristics.
566+
* @param elementGUID unique identifier of the target element.
567+
* @return relationship GUID
568+
* @throws InvalidParameterException one of the parameters is invalid.
569+
* @throws PropertyServerException there is a problem updating information in the property server(s).
570+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
571+
*/
572+
public String addCatalogTarget(String userId,
573+
String integrationConnectorGUID,
574+
String elementGUID,
575+
MetadataSourceOptions metadataSourceOptions,
576+
CatalogTargetProperties catalogTargetProperties) throws InvalidParameterException,
577+
PropertyServerException,
578+
UserNotAuthorizedException
579+
{
580+
final String methodName = "addCatalogTarget";
581+
final String assetGUIDParameterName = "integrationConnectorGUID";
582+
final String elementGUIDParameterName = "elementGUID";
583+
584+
propertyHelper.validateUserId(userId, methodName);
585+
propertyHelper.validateGUID(integrationConnectorGUID, assetGUIDParameterName, methodName);
586+
propertyHelper.validateGUID(elementGUID, elementGUIDParameterName, methodName);
587+
588+
return openMetadataClient.createRelatedElementsInStore(userId,
589+
OpenMetadataType.CATALOG_TARGET_RELATIONSHIP.typeName,
590+
integrationConnectorGUID,
591+
elementGUID,
592+
metadataSourceOptions,
593+
relationshipBuilder.getNewElementProperties(catalogTargetProperties));
594+
}
595+
596+
597+
/**
598+
* Update the properties of a catalog target relationship.
599+
*
600+
* @param userId calling user
601+
* @param relationshipGUID unique identifier of the relationship
602+
* @param updateOptions provides a structure for the additional options when updating a relationship.
603+
* @param catalogTargetProperties properties describing the catalog target processing characteristics.
604+
*/
605+
public void updateCatalogTarget(String userId,
606+
String relationshipGUID,
607+
UpdateOptions updateOptions,
608+
CatalogTargetProperties catalogTargetProperties) throws InvalidParameterException,
609+
PropertyServerException,
610+
UserNotAuthorizedException
611+
{
612+
openMetadataClient.updateRelationshipInStore(userId,
613+
relationshipGUID,
614+
updateOptions,
615+
relationshipBuilder.getElementProperties(catalogTargetProperties));
616+
}
617+
618+
619+
/**
620+
* Retrieve a specific catalog target associated with an integration connector.
621+
*
622+
* @param userId identifier of calling user.
623+
* @param relationshipGUID unique identifier of the relationship.
624+
* @param getOptions options to control the retrieve
625+
*
626+
* @return details of the integration connector and the elements it is to catalog
627+
* @throws InvalidParameterException one of the parameters is null or invalid.
628+
* @throws UserNotAuthorizedException user not authorized to issue this request.
629+
* @throws PropertyServerException problem retrieving the integration connector definition.
630+
*/
631+
public OpenMetadataRelationship getCatalogTarget(String userId,
632+
String relationshipGUID,
633+
GetOptions getOptions) throws InvalidParameterException,
634+
UserNotAuthorizedException,
635+
PropertyServerException
636+
{
637+
final String methodName = "getCatalogTarget";
638+
final String integrationConnectorGUIDParameter = "relationshipGUID";
639+
640+
propertyHelper.validateUserId(userId, methodName);
641+
propertyHelper.validateGUID(relationshipGUID, integrationConnectorGUIDParameter, methodName);
642+
643+
return openMetadataClient.getRelationshipByGUID(userId, relationshipGUID, getOptions);
644+
}
645+
646+
647+
/**
648+
* Return a list of elements that are target elements for an integration connector.
649+
*
650+
* @param userId userId of user making request.
651+
* @param integrationConnectorGUID unique identifier of the integration connector.
652+
* @param queryOptions options for query
653+
* @return list of member details
654+
* @throws InvalidParameterException one of the parameters is invalid.
655+
* @throws PropertyServerException there is a problem retrieving information from the property server(s).
656+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
657+
*/
658+
public List<OpenMetadataRootElement> getCatalogTargets(String userId,
659+
String integrationConnectorGUID,
660+
QueryOptions queryOptions) throws InvalidParameterException,
661+
PropertyServerException,
662+
UserNotAuthorizedException
663+
{
664+
final String methodName = "getCatalogTargets";
665+
final String assetGUIDParameterName = "integrationConnectorGUID";
666+
667+
propertyHelper.validateUserId(userId, methodName);
668+
propertyHelper.validateGUID(integrationConnectorGUID, assetGUIDParameterName, methodName);
669+
propertyHelper.validatePaging(queryOptions, openMetadataClient.getMaxPagingSize(), methodName);
670+
671+
return super.getRelatedRootElements(userId,
672+
integrationConnectorGUID,
673+
assetGUIDParameterName,
674+
1,
675+
OpenMetadataType.CATALOG_TARGET_RELATIONSHIP.typeName,
676+
queryOptions,
677+
methodName);
678+
}
679+
680+
681+
682+
/**
683+
* Remove an element from an integration connector's workload.
684+
*
685+
* @param userId userId of user making request.
686+
* @param integrationConnectorGUID unique identifier of the integration connector.
687+
* @param elementGUID unique identifier of the element.
688+
* @param deleteOptions options to control access to open metadata
689+
* @throws InvalidParameterException one of the parameters is invalid.
690+
* @throws PropertyServerException there is a problem updating information in the property server(s).
691+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
692+
*/
693+
public void removeCatalogTarget(String userId,
694+
String integrationConnectorGUID,
695+
String elementGUID,
696+
DeleteOptions deleteOptions) throws InvalidParameterException,
697+
PropertyServerException,
698+
UserNotAuthorizedException
699+
{
700+
final String methodName = "removeCatalogTarget";
701+
final String assetGUIDParameterName = "integrationConnectorGUID";
702+
final String elementGUIDParameterName = "elementGUID";
703+
704+
propertyHelper.validateUserId(userId, methodName);
705+
propertyHelper.validateGUID(integrationConnectorGUID, assetGUIDParameterName, methodName);
706+
propertyHelper.validateGUID(elementGUID, elementGUIDParameterName, methodName);
707+
708+
openMetadataClient.detachRelatedElementsInStore(userId,
709+
OpenMetadataType.CATALOG_TARGET_RELATIONSHIP.typeName,
710+
integrationConnectorGUID,
711+
elementGUID,
712+
deleteOptions);
713+
}
714+
715+
716+
/**
717+
* Remove an element from an integration connector's workload.
718+
*
719+
* @param userId userId of user making request.
720+
* @param relationshipGUID unique identifier of the relationship.
721+
* @param deleteOptions options to control access to open metadata
722+
* @throws InvalidParameterException one of the parameters is invalid.
723+
* @throws PropertyServerException there is a problem updating information in the property server(s).
724+
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
725+
*/
726+
public void removeCatalogTarget(String userId,
727+
String relationshipGUID,
728+
DeleteOptions deleteOptions) throws InvalidParameterException,
729+
PropertyServerException,
730+
UserNotAuthorizedException
731+
{
732+
final String methodName = "removeCatalogTarget";
733+
final String relationshipGUIDParameterName = "relationshipGUID";
734+
735+
propertyHelper.validateUserId(userId, methodName);
736+
propertyHelper.validateGUID(relationshipGUID, relationshipGUIDParameterName, methodName);
737+
738+
openMetadataClient.deleteRelationshipInStore(userId, relationshipGUID, deleteOptions);
739+
}
740+
741+
558742
/**
559743
* Attach an API to an endpoint
560744
*

0 commit comments

Comments
 (0)