diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryProperties.java index 3b3fccc1bb6..556c96ac1c2 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryProperties.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryProperties.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.*; +import java.io.Serial; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -18,7 +19,8 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class GlossaryProperties extends ReferenceableProperties { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; private String displayName = null; private String description = null; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceValueAssignmentProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceValueAssignmentProperties.java index 6448aadbb62..8e9ad002828 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceValueAssignmentProperties.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceValueAssignmentProperties.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import java.io.Serial; import java.io.Serializable; import java.util.Objects; @@ -23,8 +24,10 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ReferenceValueAssignmentProperties extends RelationshipProperties { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; + private String attributeName = null; private int confidence = 0; private String steward = null; private String stewardTypeName = null; @@ -51,6 +54,7 @@ public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties tem if (template != null) { + attributeName = template.getAttributeName(); confidence = template.getConfidence(); steward = template.getSteward(); stewardTypeName = template.getStewardTypeName(); @@ -60,6 +64,28 @@ public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties tem } + /** + * Return the name of the attribute that this reference data value represents. + * + * @return string + */ + public String getAttributeName() + { + return attributeName; + } + + + /** + * Set up the name of the attribute that this reference data value represents. + * + * @param attributeName string + */ + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + /** * Return the confidence level (0-100) that the mapping is correct. * @@ -180,6 +206,7 @@ public String toString() { return "ReferenceValueAssignmentProperties{" + "confidence=" + confidence + + ", attributeName='" + attributeName + '\'' + ", steward='" + steward + '\'' + ", stewardTypeName='" + stewardTypeName + '\'' + ", stewardPropertyName='" + stewardPropertyName + '\'' + @@ -213,9 +240,12 @@ public boolean equals(Object objectToCompare) return false; } ReferenceValueAssignmentProperties that = (ReferenceValueAssignmentProperties) objectToCompare; - return confidence == that.confidence && Objects.equals(steward, that.steward) && Objects.equals(stewardTypeName, - that.stewardTypeName) && Objects.equals( - stewardPropertyName, that.stewardPropertyName) && Objects.equals(notes, that.notes); + return confidence == that.confidence && + Objects.equals(attributeName, that.attributeName) && + Objects.equals(steward, that.steward) && + Objects.equals(stewardTypeName, that.stewardTypeName) && + Objects.equals(stewardPropertyName, that.stewardPropertyName) && + Objects.equals(notes, that.notes); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/ValidValuesRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/ValidValuesRESTServices.java index dc11a887cec..19c49c6b92d 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/ValidValuesRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/ValidValuesRESTServices.java @@ -575,6 +575,7 @@ public VoidResponse setupReferenceValueTag(String serverName, requestBody.getExternalSourceName(), validValueGUID, elementGUID, + properties.getAttributeName(), properties.getConfidence(), properties.getSteward(), properties.getStewardTypeName(), @@ -594,6 +595,7 @@ else if (requestBody.getProperties() == null) requestBody.getExternalSourceName(), validValueGUID, elementGUID, + null, 100, null, null, diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceValueAssignmentProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceValueAssignmentProperties.java index d9ca315e1f6..b8f27aaa82b 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceValueAssignmentProperties.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceValueAssignmentProperties.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import java.io.Serial; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -22,8 +23,10 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ReferenceValueAssignmentProperties extends RelationshipProperties { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; + private String attributeName = null; private int confidence = 0; private String steward = null; private String stewardTypeName = null; @@ -50,6 +53,7 @@ public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties tem if (template != null) { + attributeName = template.getAttributeName(); confidence = template.getConfidence(); steward = template.getSteward(); stewardTypeName = template.getStewardTypeName(); @@ -59,6 +63,28 @@ public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties tem } + /** + * Return the name of the attribute that this reference data value represents. + * + * @return string + */ + public String getAttributeName() + { + return attributeName; + } + + + /** + * Set up the name of the attribute that this reference data value represents. + * + * @param attributeName string + */ + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + /** * Return the confidence level (0-100) that the mapping is correct. * @@ -179,6 +205,7 @@ public String toString() { return "ReferenceValueAssignmentProperties{" + "confidence=" + confidence + + ", attributeName='" + attributeName + '\'' + ", steward='" + steward + '\'' + ", stewardTypeName='" + stewardTypeName + '\'' + ", stewardPropertyName='" + stewardPropertyName + '\'' + @@ -212,9 +239,12 @@ public boolean equals(Object objectToCompare) return false; } ReferenceValueAssignmentProperties that = (ReferenceValueAssignmentProperties) objectToCompare; - return confidence == that.confidence && Objects.equals(steward, that.steward) && Objects.equals(stewardTypeName, - that.stewardTypeName) && Objects.equals( - stewardPropertyName, that.stewardPropertyName) && Objects.equals(notes, that.notes); + return confidence == that.confidence && + Objects.equals(attributeName, that.attributeName) && + Objects.equals(steward, that.steward) && + Objects.equals(stewardTypeName, that.stewardTypeName) && + Objects.equals(stewardPropertyName, that.stewardPropertyName) && + Objects.equals(notes, that.notes); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ValidValuesRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ValidValuesRESTServices.java index 649acdf4ed8..1ea5e70de64 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ValidValuesRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ValidValuesRESTServices.java @@ -575,6 +575,7 @@ public VoidResponse setupReferenceValueTag(String serverName, requestBody.getExternalSourceName(), validValueGUID, elementGUID, + properties.getAttributeName(), properties.getConfidence(), properties.getSteward(), properties.getStewardTypeName(), @@ -594,6 +595,7 @@ else if (requestBody.getProperties() == null) requestBody.getExternalSourceName(), validValueGUID, elementGUID, + null, 100, null, null, diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageReferenceData.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageReferenceData.java index 6c47fb729df..47c9625f5e6 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageReferenceData.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageReferenceData.java @@ -3,6 +3,7 @@ package org.odpi.openmetadata.accessservices.digitalarchitecture.api; import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; +import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceValueAssignmentProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; @@ -312,22 +313,18 @@ void unassignValidValueFromConsumer(String userId, * @param userId calling user. * @param validValueGUID unique identifier of the valid value. * @param referenceableGUID unique identifier of the element to link to. - * @param confidence how confident is the steward that this mapping is correct (0-100). - * @param steward identifier of steward - * @param notes additional notes from the steward + * @param properties details of the relationship * * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - void assignReferenceValueToItem(String userId, - String validValueGUID, - String referenceableGUID, - int confidence, - String steward, - String notes) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + void assignReferenceValueToItem(String userId, + String validValueGUID, + String referenceableGUID, + ReferenceValueAssignmentProperties properties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceValueAssignmentProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceValueAssignmentProperties.java index a002a7eaa9e..6173df141fd 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceValueAssignmentProperties.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceValueAssignmentProperties.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import java.io.Serial; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -22,8 +23,10 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ReferenceValueAssignmentProperties extends RelationshipProperties { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; + private String attributeName = null; private int confidence = 0; private String steward = null; private String stewardTypeName = null; @@ -50,6 +53,7 @@ public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties tem if (template != null) { + attributeName = template.getAttributeName(); confidence = template.getConfidence(); steward = template.getSteward(); stewardTypeName = template.getStewardTypeName(); @@ -59,6 +63,28 @@ public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties tem } + /** + * Return the name of the attribute that this reference data value represents. + * + * @return string + */ + public String getAttributeName() + { + return attributeName; + } + + + /** + * Set up the name of the attribute that this reference data value represents. + * + * @param attributeName string + */ + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + /** * Return the confidence level (0-100) that the mapping is correct. * @@ -179,6 +205,7 @@ public String toString() { return "ReferenceValueAssignmentProperties{" + "confidence=" + confidence + + ", attributeName='" + attributeName + '\'' + ", steward='" + steward + '\'' + ", stewardTypeName='" + stewardTypeName + '\'' + ", stewardPropertyName='" + stewardPropertyName + '\'' + @@ -212,9 +239,12 @@ public boolean equals(Object objectToCompare) return false; } ReferenceValueAssignmentProperties that = (ReferenceValueAssignmentProperties) objectToCompare; - return confidence == that.confidence && Objects.equals(steward, that.steward) && Objects.equals(stewardTypeName, - that.stewardTypeName) && Objects.equals( - stewardPropertyName, that.stewardPropertyName) && Objects.equals(notes, that.notes); + return confidence == that.confidence && + Objects.equals(attributeName, that.attributeName) && + Objects.equals(steward, that.steward) && + Objects.equals(stewardTypeName, that.stewardTypeName) && + Objects.equals(stewardPropertyName, that.stewardPropertyName) && + Objects.equals(notes, that.notes); } diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ReferenceDataManager.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ReferenceDataManager.java index e0e2837b2c7..2ad76c823fa 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ReferenceDataManager.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ReferenceDataManager.java @@ -696,23 +696,19 @@ public void unassignValidValueFromConsumer(String userId, * @param userId calling user. * @param validValueGUID unique identifier of the valid value. * @param referenceableGUID unique identifier of the element to link to. - * @param confidence how confident is the steward that this mapping is correct (0-100). - * @param steward identifier of steward - * @param notes additional notes from the steward + * @param properties properties for the relationship * * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ @Override - public void assignReferenceValueToItem(String userId, - String validValueGUID, - String referenceableGUID, - int confidence, - String steward, - String notes) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public void assignReferenceValueToItem(String userId, + String validValueGUID, + String referenceableGUID, + ReferenceValueAssignmentProperties properties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "assignReferenceValueToItem"; final String validValueGUIDParameter = "validValueGUID"; @@ -724,14 +720,9 @@ public void assignReferenceValueToItem(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/digital-architecture/users/{1}/reference-values/{2}/items/{3}"; - ReferenceValueAssignmentProperties requestBody = new ReferenceValueAssignmentProperties(); - requestBody.setConfidence(confidence); - requestBody.setSteward(steward); - requestBody.setNotes(notes); - restClient.callVoidPostRESTCall(methodName, urlTemplate, - requestBody, + properties, serverName, userId, validValueGUID, diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentDefinitionConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentDefinitionConverter.java index a6c337a1342..56b6f54cc9d 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentDefinitionConverter.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentDefinitionConverter.java @@ -72,6 +72,7 @@ public B getNewBean(Class beanClass, { InstanceProperties instanceProperties = relationship.getProperties(); + bean.setAttributeName(this.getAttributeName(instanceProperties)); bean.setConfidence(this.getConfidence(instanceProperties)); bean.setSteward(this.getSteward(instanceProperties)); bean.setStewardTypeName(this.getStewardTypeName(instanceProperties)); diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentItemConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentItemConverter.java index f91310e6b0b..f461f12f8cb 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentItemConverter.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentItemConverter.java @@ -92,6 +92,7 @@ public B getNewBean(Class beanClass, { instanceProperties = relationship.getProperties(); + bean.setAttributeName(this.getAttributeName(instanceProperties)); bean.setConfidence(this.getConfidence(instanceProperties)); bean.setSteward(this.getSteward(instanceProperties)); bean.setStewardTypeName(this.getStewardTypeName(instanceProperties)); diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ReferenceDataRESTServices.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ReferenceDataRESTServices.java index c58736459e3..c0a01f4d13b 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ReferenceDataRESTServices.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ReferenceDataRESTServices.java @@ -23,7 +23,7 @@ * ReferenceDataRESTServices provides the API operations to create and maintain lists of valid * value definitions grouped into a valid value set. Both valid value definitions and valid value sets have * the same attributes and so inherit from ValidValue where all the attributes are defined. - * + *
* A set is just grouping of valid values. Valid value definitions and set can be nested many times in other * valid value sets. */ @@ -871,6 +871,7 @@ public VoidResponse assignReferenceValueToItem(String VoidResponse response = new VoidResponse(); AuditLog auditLog = null; int confidence = 0; + String attributeName = null; String steward = null; String stewardTypeName = null; String stewardPropertyName = null; @@ -878,6 +879,7 @@ public VoidResponse assignReferenceValueToItem(String if (requestBody != null) { + attributeName = requestBody.getAttributeName(); confidence = requestBody.getConfidence(); steward = requestBody.getSteward(); stewardTypeName = requestBody.getStewardTypeName(); @@ -903,6 +905,7 @@ public VoidResponse assignReferenceValueToItem(String null, validValueGUID, referenceableGUID, + attributeName, confidence, steward, stewardTypeName, diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/GlossaryMapper.java b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/GlossaryMapper.java index 1bd7d528fb5..7a2d6d15234 100644 --- a/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/GlossaryMapper.java +++ b/open-metadata-implementation/access-services/subject-area/subject-area-server/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/mappers/entities/GlossaryMapper.java @@ -141,7 +141,7 @@ protected void mapNodeToInstanceProperties(Glossary node, InstanceProperties ins SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, glossary.getUsage(), OpenMetadataAPIMapper.USAGE_PROPERTY_NAME); } if (node.getName() != null) { - SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, node.getName(), OpenMetadataAPIMapper.ATTRIBUTE_NAME_PROPERTY_NAME); + SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, node.getName(), OpenMetadataAPIMapper.DISPLAY_NAME_PROPERTY_NAME); } } diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java index 3d53f9e344d..436d501bac3 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java @@ -6163,6 +6163,28 @@ protected String getNotes(InstanceProperties instanceProperties) } + /** + * Extract the "attributeName" property from the supplied instance properties. + * + * @param instanceProperties properties from ReferenceValueAssignment relationship + * @return string text or null + */ + protected String getAttributeName(InstanceProperties instanceProperties) + { + final String methodName = "getAttributeName"; + + if (instanceProperties != null) + { + return repositoryHelper.getStringProperty(serviceName, + OpenMetadataAPIMapper.ATTRIBUTE_NAME_PROPERTY_NAME, + instanceProperties, + methodName); + } + + return null; + } + + /** * Extract the pointType property from the supplied instance properties. * diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIMapper.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIMapper.java index a9931fd0e43..021cc2cd762 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIMapper.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIMapper.java @@ -1445,6 +1445,7 @@ public class OpenMetadataAPIMapper public static final String IMPLEMENTATION_DESCRIPTION_PROPERTY_NAME = "implementationDescription"; /* from GovernanceControl entity */ public static final String NAME_PATTERN_PROPERTY_NAME = "namePattern"; /* from NamingStandardRule entity */ public static final String NOTES_PROPERTY_NAME = "notes"; /* from multiple entities */ + public static final String ATTRIBUTE_NAME_PROPERTY_NAME = "attributeName"; /* from ReferenceValueAssignment relationship */ public static final String RATIONALE_PROPERTY_NAME = "rationale"; /* from GovernanceResponse, GovernanceImplementation relationship */ public static final String GOVERNANCE_PROJECT_CLASSIFICATION_TYPE_GUID = "37142317-4125-4046-9514-71dc5031563f"; @@ -2079,8 +2080,6 @@ public class OpenMetadataAPIMapper public static final String SCHEMA_ATTRIBUTE_TYPE_NAME = "SchemaAttribute"; /* SchemaElement */ - public static final String ATTRIBUTE_NAME_PROPERTY_NAME = "displayName"; /* from SchemaAttribute entity */ - public static final String OLD_ATTRIBUTE_NAME_PROPERTY_NAME = "name"; /* from SchemaAttribute entity */ public static final String ELEMENT_POSITION_PROPERTY_NAME = "position"; /* from SchemaAttribute entity */ public static final String CARDINALITY_PROPERTY_NAME = "cardinality"; /* from SchemaAttribute entity */ public static final String MAX_CARDINALITY_PROPERTY_NAME = "maxCardinality"; /* from SchemaAttribute entity */ diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValuesHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValuesHandler.java index a5ff60208c3..05ecf51b9da 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValuesHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValuesHandler.java @@ -807,6 +807,7 @@ public void unassignValidValueFromConsumer(String userId, * @param externalSourceName name of the software capability entity that represented the external source * @param validValueGUID unique identifier of the valid value. * @param referenceableGUID unique identifier of the element to link to. + * @param attributeName name of the attribute that this relationship represents * @param confidence how confident is the steward that this mapping is correct (0-100). * @param steward identifier of steward * @param stewardTypeName type of element that represents steward @@ -827,6 +828,7 @@ public void assignReferenceValueToItem(String userId, String externalSourceName, String validValueGUID, String referenceableGUID, + String attributeName, int confidence, String steward, String stewardTypeName, @@ -854,6 +856,12 @@ public void assignReferenceValueToItem(String userId, confidence, methodName); + relationshipProperties = repositoryHelper.addStringPropertyToInstance(serviceName, + relationshipProperties, + OpenMetadataAPIMapper.ATTRIBUTE_NAME_PROPERTY_NAME, + attributeName, + methodName); + relationshipProperties = repositoryHelper.addStringPropertyToInstance(serviceName, relationshipProperties, OpenMetadataAPIMapper.STEWARD_PROPERTY_NAME, diff --git a/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/src/main/java/org/odpi/openmetadata/metadatasecurity/OpenMetadataGlossarySecurity.java b/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/src/main/java/org/odpi/openmetadata/metadatasecurity/OpenMetadataGlossarySecurity.java new file mode 100644 index 00000000000..f860b08ca0e --- /dev/null +++ b/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/src/main/java/org/odpi/openmetadata/metadatasecurity/OpenMetadataGlossarySecurity.java @@ -0,0 +1,116 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.metadatasecurity; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.metadatasecurity.properties.Glossary; + + +/** + * OpenMetadataGlossarySecurity assures the access to glossary content. + * Glossary categories and terms are anchored to a single glossary. + * Glossary terms may be linked to multiple categories, some in different glossaries. + * This interface allows the security connector to control whether a user can: + * + *