Skip to content

Commit

Permalink
Merge pull request #8406 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Further restructure of OpenMetadata Types management
  • Loading branch information
mandy-chessell authored Sep 30, 2024
2 parents 94d85a7 + 01d6e08 commit 932ec3d
Show file tree
Hide file tree
Showing 120 changed files with 4,072 additions and 6,344 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public B getNewComplexBean(Class<B> beanClass,
{
if ((relationship != null) && (relationship.getType() != null))
{
if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.EMBEDDED_CONNECTION_TYPE_NAME))
if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.EMBEDDED_CONNECTION_RELATIONSHIP.typeName))
{
EmbeddedConnection embeddedConnection = new EmbeddedConnection();

Expand All @@ -124,11 +124,11 @@ public B getNewComplexBean(Class<B> beanClass,

embeddedConnections.add(embeddedConnection);
}
else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_CONNECTOR_TYPE_TYPE_NAME))
else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_CONNECTOR_TYPE_RELATIONSHIP.typeName))
{
bean.setConnectorType(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName));
}
else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_ENDPOINT_TYPE_NAME))
else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_ENDPOINT_RELATIONSHIP.typeName))
{
bean.setEndpoint(getElementStub(beanClass, relationship.getEntityOneProxy(), methodName));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public void setupAcceptedAnswer(String userId,

externalIdentifierHandler.logRelationshipCreation(assetManagerGUID,
assetManagerName,
OpenMetadataType.ANSWER_RELATIONSHIP_TYPE_GUID,
OpenMetadataType.ACCEPTED_ANSWER_RELATIONSHIP.typeName,
questionCommentGUID,
OpenMetadataType.COMMENT.typeName,
answerCommentGUID,
Expand Down Expand Up @@ -471,7 +471,7 @@ public void clearAcceptedAnswer(String userId,

externalIdentifierHandler.logRelationshipRemoval(assetManagerGUID,
assetManagerName,
OpenMetadataType.ANSWER_RELATIONSHIP_TYPE_NAME,
OpenMetadataType.ACCEPTED_ANSWER_RELATIONSHIP.typeName,
questionCommentGUID,
OpenMetadataType.COMMENT.typeName,
answerCommentGUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private void addCorrelationPropertiesToConnections(String userI
element.setCorrelationHeaders(this.getCorrelationProperties(userId,
element.getElementHeader().getGUID(),
connectionGUIDParameterName,
OpenMetadataType.CONNECTION_TYPE_NAME,
OpenMetadataType.CONNECTION.typeName,
assetManagerGUID,
assetManagerName,
forLineage,
Expand Down Expand Up @@ -230,7 +230,7 @@ private void addCorrelationPropertiesToConnectorTypes(String
element.setCorrelationHeaders(this.getCorrelationProperties(userId,
element.getElementHeader().getGUID(),
connectorTypeGUIDParameterName,
OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME,
OpenMetadataType.CONNECTOR_TYPE.typeName,
assetManagerGUID,
assetManagerName,
forLineage,
Expand Down Expand Up @@ -490,7 +490,7 @@ public void updateConnection(String userId,
this.validateExternalIdentifier(userId,
connectionGUID,
connectionGUIDParameterName,
OpenMetadataType.CONNECTION_TYPE_NAME,
OpenMetadataType.CONNECTION.typeName,
correlationProperties,
forLineage,
forDuplicateProcessing,
Expand Down Expand Up @@ -1070,7 +1070,7 @@ public void removeConnection(String userId,
this.validateExternalIdentifier(userId,
connectionGUID,
connectionGUIDParameterName,
OpenMetadataType.CONNECTION_TYPE_NAME,
OpenMetadataType.CONNECTION.typeName,
correlationProperties,
forLineage,
forDuplicateProcessing,
Expand Down Expand Up @@ -1247,7 +1247,7 @@ public List<ConnectionElement> getConnectionsForAssetManager(String userId,
assetManagerGUID,
assetManagerGUIDParameterName,
OpenMetadataType.SOFTWARE_CAPABILITY.typeName,
OpenMetadataType.CONNECTION_TYPE_NAME,
OpenMetadataType.CONNECTION.typeName,
startFrom,
validatedPageSize,
effectiveTime,
Expand All @@ -1268,7 +1268,7 @@ public List<ConnectionElement> getConnectionsForAssetManager(String userId,
element.setCorrelationHeaders(this.getCorrelationProperties(userId,
entity.getGUID(),
entityGUIDParameterName,
OpenMetadataType.CONNECTION_TYPE_NAME,
OpenMetadataType.CONNECTION.typeName,
assetManagerGUID,
assetManagerName,
forLineage,
Expand Down Expand Up @@ -1340,7 +1340,7 @@ public ConnectionElement getConnectionByGUID(String userId,
element.setCorrelationHeaders(this.getCorrelationProperties(userId,
element.getElementHeader().getGUID(),
connectionGUIDParameterName,
OpenMetadataType.CONNECTION_TYPE_NAME,
OpenMetadataType.CONNECTION.typeName,
assetManagerGUID,
assetManagerName,
forLineage,
Expand Down Expand Up @@ -1963,7 +1963,7 @@ public String createConnectorType(String userId,
this.createExternalIdentifier(userId,
connectorTypeGUID,
connectorTypeGUIDParameterName,
OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME,
OpenMetadataType.CONNECTOR_TYPE.typeName,
correlationProperties,
false,
false,
Expand Down Expand Up @@ -2023,7 +2023,7 @@ public String createConnectorTypeFromTemplate(String user
this.createExternalIdentifier(userId,
connectorTypeGUID,
connectorTypeGUIDParameterName,
OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME,
OpenMetadataType.CONNECTOR_TYPE.typeName,
correlationProperties,
false,
false,
Expand Down Expand Up @@ -2079,7 +2079,7 @@ public void updateConnectorType(String userId,
this.validateExternalIdentifier(userId,
connectorTypeGUID,
connectorTypeGUIDParameterName,
OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME,
OpenMetadataType.CONNECTOR_TYPE.typeName,
correlationProperties,
forLineage,
forDuplicateProcessing,
Expand Down Expand Up @@ -2153,7 +2153,7 @@ public void removeConnectorType(String userId,
this.validateExternalIdentifier(userId,
connectorTypeGUID,
connectorTypeGUIDParameterName,
OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME,
OpenMetadataType.CONNECTOR_TYPE.typeName,
correlationProperties,
forLineage,
forDuplicateProcessing,
Expand Down Expand Up @@ -2329,7 +2329,7 @@ public List<ConnectorTypeElement> getConnectorTypesForAssetManager(String userI
assetManagerGUID,
assetManagerGUIDParameterName,
OpenMetadataType.SOFTWARE_CAPABILITY.typeName,
OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME,
OpenMetadataType.CONNECTOR_TYPE.typeName,
startFrom,
validatedPageSize,
effectiveTime,
Expand All @@ -2350,7 +2350,7 @@ public List<ConnectorTypeElement> getConnectorTypesForAssetManager(String userI
element.setCorrelationHeaders(this.getCorrelationProperties(userId,
entity.getGUID(),
entityGUIDParameterName,
OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME,
OpenMetadataType.CONNECTOR_TYPE.typeName,
assetManagerGUID,
assetManagerName,
forLineage,
Expand Down Expand Up @@ -2422,7 +2422,7 @@ public ConnectorTypeElement getConnectorTypeByGUID(String userId,
element.setCorrelationHeaders(this.getCorrelationProperties(userId,
element.getElementHeader().getGUID(),
connectorTypeGUIDParameterName,
OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME,
OpenMetadataType.CONNECTOR_TYPE.typeName,
assetManagerGUID,
assetManagerName,
forLineage,
Expand Down
Loading

0 comments on commit 932ec3d

Please sign in to comment.