Class ValidValuesHandler<B>
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIAnchorHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPITemplateHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.ValidValuesHandler<B>
ValidValuesHandler provides the methods 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIAnchorHandler
OpenMetadataAPIAnchorHandler.AnchorIdentifiers
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler
assetActionDescription, auditLog, beanClass, converter, defaultZones, errorHandler, invalidParameterHandler, localServerUserId, publishZones, qualifiedNamePropertyNamesList, repositoryHandler, repositoryHelper, securityVerifier, serverName, serviceName, supportedZones
-
Constructor Summary
ConstructorsConstructorDescriptionValidValuesHandler
(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog) Construct the handler information needed to interact with the repository services -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachConsistentValidValues
(String userId, String externalSourceGUID, String externalSourceName, String validValue1GUID, String validValue2GUID, Date effectiveFrom, Date effectiveTo, List<String> suppliedSupportedZones, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Create a link between two valid values that should be used together to populate or validate elements for consistency.createValidValue
(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, String setGUID, String suppliedTypeName, boolean isDefaultValue, String qualifiedName, String displayName, String description, String category, String usage, String scope, String preferredValue, String dataType, String userDefinedStatus, boolean isCaseSensitive, Map<String, String> additionalProperties, Map<String, Object> extendedProperties, List<String> suppliedSupportedZones, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Create a new valid value definition.void
deleteValidValue
(String userId, String externalSourceGUID, String externalSourceName, String validValueGUID, String qualifiedName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Remove the valid value form the repository.getConsistentValidValues
(String userId, String validValueGUID, String validValueGUIDParameter, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, List<String> suppliedSupportedZones, Date effectiveTime, String methodName) Page through the consistent values from different valid value sets.getValidValueSetMembers
(String userId, String validValueSetGUID, String validValueSetGUIDParameter, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, List<String> suppliedSupportedZones, Date effectiveTime, String methodName) Page through the members of a valid value set.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler
getBeanGUIDByQualifiedName, getBeanGUIDByQualifiedName, linkConsolidatedDuplicate, linkElementsAsPeerDuplicates, setVendorProperties
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPITemplateHandler
createBeanFromTemplate, createBeanFromTemplate
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
addAnchorGUIDToBuilder, archiveBeanInRepository, createBeanInRepository, createBeanInRepository, deleteAnchoredBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteIfAppropriatelyAnchoredEntity, findAttachmentLinks, findBeans, findBeans, findEntities, findEntities, findEntities, findEntities, getAllAttachmentLinks, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntity, getAttachmentLink, getAttachmentLinks, getAttachmentLinks, getAttachmentLinks, getBeanByUniqueName, getBeanByValue, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDByUniqueName, getBeanHistory, getBeansByValue, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityFromRepository, getRelationshipHistory, getSpecification, getUniqueAttachmentLink, getValidatedBeans, getValidatedEntities, getValidatedEntities, linkElementToElement, linkElementToElement, linkElementToElement, multiLinkElementToElement, removeClassificationFromRepository, removeCollectionMembers, removeDataStructureMembers, removeDeployedAssets, removeFolderContents, removeLinkedDatabaseSchemas, removeLinkedDataClasses, removeNestedComments, removeNestedDataFields, setClassificationInRepository, setClassificationInRepository, uncheckedLinkElementToElement, undoBeanUpdateInRepository, unlinkAllElements, unlinkElementFromElement, unlinkElementFromElement, updateBeanEffectivityDates, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, updateClassificationEffectivityDates, updateElementToElementLink, updateRelationshipEffectivityDates, updateRelationshipProperties, validateAnchorEntity, validateAnchorGUID, validateEntitiesAndAnchorsForRead, validateEntityAndAnchorForRead, validateEntityAndAnchorForRead, validateRelationship, validateUniqueProperty
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIAnchorHandler
addAnchorsClassification, getAnchorGUIDForEntity, getAnchorScopeGUIDFromAnchorsClassification, getAnchorsFromAnchorsClassification, getDomainName, getDomainName, setUpAnchorsClassificationFromAnchor, setUpAnchorsClassificationFromParent
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler
getConverter, getElementStub, getRepositoryHandler, getRepositoryHelper, getServerName, getServiceName, getSupportedZones, getTypeDefByName, setSecurityVerifier
-
Constructor Details
-
ValidValuesHandler
public ValidValuesHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog) Construct the handler information needed to interact with the repository services- Parameters:
converter
- specific converter for the B bean classbeanClass
- name of bean class that is represented by the generic class BserviceName
- name of this serviceserverName
- name of the local serverinvalidParameterHandler
- handler for managing parameter errorsrepositoryHandler
- manages calls to the repository servicesrepositoryHelper
- provides utilities for manipulating the repository services objectslocalServerUserId
- userId for this serversecurityVerifier
- open metadata security services verifiersupportedZones
- list of zones that the access service is allowed to serve Asset instances from.defaultZones
- list of zones that the access service should set in all new Asset instances.publishZones
- list of zones that the access service sets up in published Asset instances.auditLog
- destination for audit log events.
-
-
Method Details
-
createValidValue
public String createValidValue(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, String setGUID, String suppliedTypeName, boolean isDefaultValue, String qualifiedName, String displayName, String description, String category, String usage, String scope, String preferredValue, String dataType, String userDefinedStatus, boolean isCaseSensitive, Map<String, String> additionalProperties, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionObject> extendedProperties, List<String> suppliedSupportedZones, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Create a new valid value definition.- Parameters:
userId
- calling user.externalSourceGUID
- guid of the software capability entity that represented the external source - null for localexternalSourceName
- name of the software capability entity that represented the external sourceanchorGUID
- unique identifier of the anchor for this valid valuesetGUID
- unique identifier of the set to attach this tosuppliedTypeName
- name of the type to createisDefaultValue
- is this the default value for the set?qualifiedName
- unique namedisplayName
- displayable descriptive name.description
- further information.category
- what is the category of reference data does this fall into?usage
- how/when should this value be used.scope
- what is the scope of the values.preferredValue
- the value that should be used in an implementation if possible.dataType
- the data type of the preferred value.userDefinedStatus
- is the valid value deprecatedisCaseSensitive
- is the valid value case-sensitiveadditionalProperties
- additional properties for this definition.extendedProperties
- properties that need to be populated into a subtype.suppliedSupportedZones
- list of zones that any asset must be a member of at least one to be visibleeffectiveFrom
- starting time for this relationship (null for all time)effectiveTo
- ending time for this relationship (null for all time)forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- unique identifier for the new definition
- Throws:
InvalidParameterException
- one of the parameters is invalid.UserNotAuthorizedException
- the user is not authorized to make this request.PropertyServerException
- the repository is not available or not working properly.
-
deleteValidValue
public void deleteValidValue(String userId, String externalSourceGUID, String externalSourceName, String validValueGUID, String qualifiedName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the valid value form the repository. All links to it are deleted too.- Parameters:
userId
- calling userexternalSourceGUID
- guid of the software capability entity that represented the external source - null for localexternalSourceName
- name of the software capability entity that represented the external sourcevalidValueGUID
- unique identifier of the value to deletequalifiedName
- unique name of the value to delete. This is used to verify that the correct valid value is being deleted.forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is invalid.UserNotAuthorizedException
- the user is not authorized to make this request.PropertyServerException
- the repository is not available or not working properly.
-
attachConsistentValidValues
public void attachConsistentValidValues(String userId, String externalSourceGUID, String externalSourceName, String validValue1GUID, String validValue2GUID, Date effectiveFrom, Date effectiveTo, List<String> suppliedSupportedZones, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a link between two valid values that should be used together to populate or validate elements for consistency.- Parameters:
userId
- calling user.externalSourceGUID
- guid of the software capability entity that represented the external source - null for localexternalSourceName
- name of the software capability entity that represented the external sourcevalidValue1GUID
- unique identifier of first valid valuevalidValue2GUID
- unique identifier of second valid valuesuppliedSupportedZones
- list of zones that any asset must be a member of at least one to be visibleeffectiveFrom
- starting time for this relationship (null for all time)effectiveTo
- ending time for this relationship (null for all time)forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is invalid.UserNotAuthorizedException
- the user is not authorized to make this request.PropertyServerException
- the repository is not available or not working properly.
-
getValidValueSetMembers
public List<B> getValidValueSetMembers(String userId, String validValueSetGUID, String validValueSetGUIDParameter, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, List<String> suppliedSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Page through the members of a valid value set.- Parameters:
userId
- calling uservalidValueSetGUID
- unique identifier of the valid value setvalidValueSetGUIDParameter
- name of parameter providing the validValueSetGUIDstartFrom
- paging starting pointpageSize
- maximum number of return values.forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicatesuppliedSupportedZones
- list of zones that any asset must be a member of at least one to be visibleeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- list of valid value beans
- Throws:
InvalidParameterException
- one of the parameters is invalid.UserNotAuthorizedException
- the user is not authorized to make this request.PropertyServerException
- the repository is not available or not working properly.
-
getConsistentValidValues
public List<B> getConsistentValidValues(String userId, String validValueGUID, String validValueGUIDParameter, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, List<String> suppliedSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Page through the consistent values from different valid value sets.- Parameters:
userId
- calling uservalidValueGUID
- unique identifier of the valid value setvalidValueGUIDParameter
- name of parameter providing the validValueGUIDstartFrom
- paging starting pointpageSize
- maximum number of return values.forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicatesuppliedSupportedZones
- list of zones that any asset must be a member of at least one to be visibleeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- list of valid value beans
- Throws:
InvalidParameterException
- one of the parameters is invalid.UserNotAuthorizedException
- the user is not authorized to make this request.PropertyServerException
- the repository is not available or not working properly.
-