Skip to content

Commit

Permalink
Merge pull request #8177 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Run integration connector in own thread
  • Loading branch information
mandy-chessell authored May 2, 2024
2 parents 5368b61 + 162b340 commit 79f8918
Show file tree
Hide file tree
Showing 72 changed files with 952 additions and 727 deletions.
2 changes: 1 addition & 1 deletion OpenConnectorsArchiveGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ server.port=9443
### when the server is being configured using double curly braces. They are replaced by
### the values specified in platform.placeholder.variables each time the server starts up.
###
### The "kafkaep" value is the Apache Kafka endpoint, and it is used in the active-metadata-store
### The "kafkaEndpoint" value is the Apache Kafka endpoint, and it is used in the active-metadata-store
### sample configuration. If your Apache Kafka broker is listening on a different endpoint
### and you want to use active-metadata-store, change this variable to your Apache Kafka's address.
################################################
Expand Down
2 changes: 1 addition & 1 deletion content-packs/OpenConnectorsArchive.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenConnectorsArchive.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ public void updateConnection(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(connectionGUID, connectionGUIDParameterName, methodName);
invalidParameterHandler.validateObject(connectionProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(connectionProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(connectionProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

ConnectionRequestBody requestBody = new ConnectionRequestBody();
requestBody.setElementProperties(connectionProperties);
Expand Down Expand Up @@ -1160,7 +1163,10 @@ public void updateEndpoint(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(endpointGUID, endpointGUIDParameterName, methodName);
invalidParameterHandler.validateObject(endpointProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(endpointProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(endpointProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

EndpointRequestBody requestBody = new EndpointRequestBody();
requestBody.setElementProperties(endpointProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,10 @@ public void updateProcess(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(processGUID, processGUIDParameterName, methodName);
invalidParameterHandler.validateObject(processProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(processProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(processProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

ProcessRequestBody requestBody = new ProcessRequestBody();
requestBody.setElementProperties(processProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,10 @@ public void updateSchemaType(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(schemaTypeGUID, schemaTypeGUIDParameterName, methodName);
invalidParameterHandler.validateObject(schemaTypeProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(schemaTypeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(schemaTypeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

SchemaTypeRequestBody requestBody = new SchemaTypeRequestBody();
requestBody.setElementProperties(schemaTypeProperties);
Expand Down Expand Up @@ -1152,7 +1155,10 @@ public void updateSchemaAttribute(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(schemaAttributeGUID, schemaAttributeGUIDParameterName, methodName);
invalidParameterHandler.validateObject(schemaAttributeProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(schemaAttributeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(schemaAttributeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

SchemaAttributeRequestBody requestBody = new SchemaAttributeRequestBody();
requestBody.setElementProperties(schemaAttributeProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ public void updateComment(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(commentGUID, commentGUIDParameterName, methodName);
invalidParameterHandler.validateObject(commentProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(commentProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(commentProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

int commentType = CommentType.STANDARD_COMMENT.getOrdinal();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,10 @@ public void updateEndpoint(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(endpointGUID, endpointGUIDParameterName, methodName);
invalidParameterHandler.validateObject(endpointProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(endpointProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(endpointProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

endpointHandler.updateEndpoint(userId,
this.getExternalSourceGUID(correlationProperties),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ public void updateDataAsset(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(assetGUID, assetGUIDParameterName, methodName);
invalidParameterHandler.validateObject(assetProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(assetProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(assetProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

this.validateExternalIdentifier(userId,
assetGUID,
Expand Down Expand Up @@ -979,7 +982,7 @@ private RelationshipElement getRelationshipElement(Relationship relationship,

if (relationship.getProperties() != null)
{
if (OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_TYPE_NAME.equals(relationship.getType().getTypeDefName()))
if (OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_RELATIONSHIP.typeName.equals(relationship.getType().getTypeDefName()))
{
DataContentForDataSetProperties properties = new DataContentForDataSetProperties();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,10 @@ public void updateGlossary(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(glossaryGUID, glossaryGUIDParameterName, methodName);
invalidParameterHandler.validateObject(glossaryProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(glossaryProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(glossaryProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

this.validateExternalIdentifier(userId,
glossaryGUID,
Expand Down Expand Up @@ -1606,7 +1609,10 @@ public void updateGlossaryCategory(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(glossaryCategoryGUID, glossaryCategoryGUIDParameterName, methodName);
invalidParameterHandler.validateObject(glossaryCategoryProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(glossaryCategoryProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(glossaryCategoryProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

this.validateExternalIdentifier(userId,
glossaryCategoryGUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,10 @@ public void updateNoteLog(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(noteLogGUID, noteLogGUIDParameterName, methodName);
invalidParameterHandler.validateObject(noteLogProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(noteLogProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(noteLogProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

this.validateExternalIdentifier(userId,
noteLogGUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,10 @@ public void updateSchemaType(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(schemaTypeGUID, schemaTypeGUIDParameterName, methodName);
invalidParameterHandler.validateObject(schemaTypeProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(schemaTypeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(schemaTypeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

this.validateExternalIdentifier(userId,
schemaTypeGUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,10 @@ public void updateSchemaType(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(schemaTypeGUID, schemaTypeGUIDParameterName, methodName);
invalidParameterHandler.validateObject(schemaTypeProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(schemaTypeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(schemaTypeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-types/{2}?isMergeUpdate={3}";

Expand Down Expand Up @@ -1702,7 +1705,10 @@ public void updateSchemaAttribute(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(schemaAttributeGUID, schemaAttributeGUIDParameterName, methodName);
invalidParameterHandler.validateObject(schemaAttributeProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(schemaAttributeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (isMergeUpdate)
{
invalidParameterHandler.validateName(schemaAttributeProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/{2}?isMergeUpdate={3}";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ public List<ValidValueElement> findValidValues(String userId,
UserNotAuthorizedException,
PropertyServerException
{
final String methodName = "getValidValueByName";
final String methodName = "findValidValues";
final String parameterName = "searchString";
final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/asset-owner/users/{1}/valid-values/by-search-string?startFrom={3}&pageSize={4}";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ private RelationshipElement getRelationshipElement(Relationship relation

if (relationship.getProperties() != null)
{
if (OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_TYPE_NAME.equals(relationship.getType().getTypeDefName()))
if (OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_RELATIONSHIP.typeName.equals(relationship.getType().getTypeDefName()))
{
DataContentForDataSetProperties properties = new DataContentForDataSetProperties();

Expand Down Expand Up @@ -1896,7 +1896,10 @@ public VoidResponse updateSchemaType(String serverName,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(schemaTypeGUID, schemaTypeGUIDParameterName, methodName);
invalidParameterHandler.validateObject(requestBody, propertiesParameterName, methodName);
invalidParameterHandler.validateName(requestBody.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(requestBody.getQualifiedName(), qualifiedNameParameterName, methodName);
}

SchemaTypeBuilder builder = this.getSchemaTypeBuilder(requestBody,
instanceHandler.getRepositoryHelper(userId, serverName, methodName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public String upsertDatabaseSchema(String userId, String databaseGUID, DatabaseS
databaseSchemaAssetHandler.linkElementToElement(userId, externalSourceGUID, externalSourceName, databaseGUID,
DATABASE_GUID, OpenMetadataType.DATABASE_TYPE_NAME, databaseSchemaGUID, DATABASE_SCHEMA_GUID,
OpenMetadataType.DEPLOYED_DATABASE_SCHEMA_TYPE_NAME, false, false,
OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_TYPE_GUID, OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_TYPE_NAME,
OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_RELATIONSHIP.typeGUID, OpenMetadataType.DATA_CONTENT_FOR_DATA_SET_RELATIONSHIP.typeName,
(InstanceProperties) null, null, null, now, methodName);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ public void updateAPI(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(apiGUID, elementGUIDParameterName, methodName);
invalidParameterHandler.validateObject(apiProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(apiProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(apiProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

final String urlTemplate = serverPlatformURLRoot + apiURLTemplatePrefix + "/{2}?isMergeUpdate={3}";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,10 @@ public void updateForm(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(formGUID, elementGUIDParameterName, methodName);
invalidParameterHandler.validateObject(formProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(formProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (!isMergeUpdate)
{
invalidParameterHandler.validateName(formProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

final String urlTemplate = serverPlatformURLRoot + formURLTemplatePrefix + "/{2}?isMergeUpdate={3}";

Expand Down Expand Up @@ -724,7 +727,10 @@ public void updateReport(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(reportGUID, elementGUIDParameterName, methodName);
invalidParameterHandler.validateObject(reportProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(reportProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (!isMergeUpdate)
{
invalidParameterHandler.validateName(reportProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

final String urlTemplate = serverPlatformURLRoot + reportURLTemplatePrefix + "/{2}?isMergeUpdate={3}";

Expand Down Expand Up @@ -1182,7 +1188,10 @@ public void updateQuery(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(queryGUID, elementGUIDParameterName, methodName);
invalidParameterHandler.validateObject(queryProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(queryProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(queryProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

final String urlTemplate = serverPlatformURLRoot + queryURLTemplatePrefix + "/{2}?isMergeUpdate={3}";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ public void updateTopic(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(topicGUID, elementGUIDParameterName, methodName);
invalidParameterHandler.validateObject(topicProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(topicProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (! isMergeUpdate)
{
invalidParameterHandler.validateName(topicProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

final String urlTemplate = serverPlatformURLRoot + topicURLTemplatePrefix + "/{2}?isMergeUpdate={3}";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,10 @@ public void updateDataFileInCatalog(String userId,
invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(dataFileGUID, dataFileGUIDParameterName, methodName);
invalidParameterHandler.validateObject(dataFileProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(dataFileProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
if (!isMergeUpdate)
{
invalidParameterHandler.validateName(dataFileProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
}

final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/data-files/{2}?isMergeUpdate={3}";

Expand Down
Loading

0 comments on commit 79f8918

Please sign in to comment.