Class DataFieldHandler<B>
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.DataFieldHandler<B>
- Type Parameters:
B
- class of bean
Handler for data fields which are part of discovery reports.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
OpenMetadataAPIGenericHandler.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
ConstructorDescriptionDataFieldHandler
(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 TypeMethodDescriptionaddDataFieldToDataField
(String userId, String externalSourceGUID, String externalSourceName, String parentDataFieldGUID, int dataFieldPosition, String dataFieldName, String dataFieldType, String dataFieldDescription, List<String> dataFieldAliases, int dataFieldSortOrder, String defaultValue, Map<String, String> additionalProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Add a new data field and link it to an existing data field.addDataFieldToDiscoveryReport
(String userId, String externalSourceGUID, String externalSourceName, String annotationGUID, int dataFieldPosition, String dataFieldName, String dataFieldType, String dataFieldDescription, List<String> dataFieldAliases, int dataFieldSortOrder, String defaultValue, Map<String, String> additionalProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Add a new data field to the Annotation store linked off of an annotation (typically SchemaAnalysisAnnotation).void
deleteDataField
(String userId, String externalSourceGUID, String externalSourceName, String dataFieldGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Remove a data field from the metadata repositories.getDataField
(String userId, String dataFieldGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return a specific data field stored in the metadata repositories.getLinkedDataFields
(String userId, String dataFieldGUID, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return any peer data fields attached to this data field.getNestedDataFields
(String userId, String parentDataFieldGUID, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return any data fields attached to this data field.getNewDataFieldsForAsset
(String userId, String discoveryReportGUID, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return the current list of data fields for this discovery run.getPreviousDataFieldsForAsset
(String userId, String discoveryReportGUID, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return the list of data fields from previous runs of the discovery service.void
linkDataFields
(String userId, String externalSourceGUID, String externalSourceName, String linkFromDataFieldGUID, String linkToDataFieldGUID, int relationshipEnd, String relationshipTypeName, Map<String, String> additionalProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Add a new data field and link it to an existing data field.void
updateDataField
(String userId, String externalSourceGUID, String externalSourceName, String dataFieldGUID, boolean isMergeUpdate, String dataFieldName, String dataFieldType, String dataFieldDescription, List<String> dataFieldAliases, int dataFieldSortOrder, String defaultValue, Map<String, String> additionalProperties, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Replace the current properties of a data field.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
addAnchorGUIDToBuilder, addAnchorsClassification, archiveBeanInRepository, archiveBeanInRepository, countAttachments, createBeanInRepository, createBeanInRepository, deleteAnchoredEntity, deleteBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteRelationship, findAttachmentLinks, findBeanGUIDs, findBeans, findBeans, findBeans, findEntities, findEntities, findEntities, findEntities, getAllAttachmentLinks, getAnchorGUIDFromAnchorsClassification, getAttachedElement, getAttachedElementGUID, getAttachedElementGUID, getAttachedElementGUIDs, getAttachedElementGUIDs, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntities, getAttachedEntitiesFromUser, getAttachedEntity, getAttachedEntity, getAttachedEntityFromUser, getAttachmentLink, getAttachmentLinks, getAttachmentLinks, getAttachmentLinks, getAttachmentsForType, getBeanByUniqueName, getBeanByUniqueName, getBeanByValue, getBeanFromEntity, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDByUniqueName, getBeanGUIDsByClassification, getBeanGUIDsByType, getBeanGUIDsByType, getBeanHistory, getBeansByClassification, getBeansByCreator, getBeansByIntValue, getBeansByType, getBeansByType, getBeansByValue, getBeansByValue, getDomainName, getDomainName, getEntitiesByIntValue, getEntitiesByType, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityGUIDByValue, getEntityGUIDsByValue, getSpecification, getSupplementaryProperties, getUniqueAttachmentLink, getUniqueAttachmentLink, isBeanIsolated, isEntityATypeOf, linkElementToElement, linkElementToElement, linkElementToElement, maintainSupplementaryProperties, multiLinkElementToElement, relinkElementToNewElement, relinkElementToNewElement, removeClassificationFromRepository, removeClassificationFromRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, uncheckedLinkElementToElement, undoBeanUpdateInRepository, undoBeanUpdateInRepository, undoBeanUpdateInRepository, unlinkAllElements, unlinkConnectedElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, updateBeanEffectivityDates, updateBeanEffectivityDates, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, updateBeanStatusInRepository, updateClassificationEffectivityDates, updateElementToElementLink, updateElementToElementLink, updateElementToElementLink, updateRelationshipEffectivityDates, updateRelationshipEffectivityDates, updateRelationshipProperties, updateRelationshipProperties, validateAnchorEntity, validateAnchorEntity, validateUniqueProperty, verifyExternalSourceIdentity
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler
getConverter, getElementStub, getRepositoryHandler, getRepositoryHelper, getServerName, getServiceName, getSupportedZones, getTypeDefByName, setSecurityVerifier
-
Constructor Details
-
DataFieldHandler
public DataFieldHandler(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 this 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
-
getPreviousDataFieldsForAsset
public List<B> getPreviousDataFieldsForAsset(String userId, String discoveryReportGUID, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the list of data fields from previous runs of the discovery service. These data fields are the data fields are the accepted data fields linked to the asset's schema.- Parameters:
userId
- identifier of calling userdiscoveryReportGUID
- unique identifier of the discovery analysis reportstartingFrom
- starting position in the list.pageSize
- maximum number of elements that can be returnedforLineage
- 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:
- list of data fields (or null if none are registered)
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user id not authorized to issue this requestPropertyServerException
- there was a problem retrieving data fields from the annotation store.
-
getNewDataFieldsForAsset
public List<B> getNewDataFieldsForAsset(String userId, String discoveryReportGUID, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the current list of data fields for this discovery run.- Parameters:
userId
- identifier of calling userdiscoveryReportGUID
- unique identifier of the discovery analysis reportstartingFrom
- starting position in the list.pageSize
- maximum number of elements that can be returnedforLineage
- 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:
- list of data fields (or null if none are registered)
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user id not authorized to issue this requestPropertyServerException
- there was a problem retrieving data fields from the annotation store.
-
getNestedDataFields
public List<B> getNestedDataFields(String userId, String parentDataFieldGUID, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return any data fields attached to this data field.- Parameters:
userId
- identifier of calling userparentDataFieldGUID
- parent data field identifierstartingFrom
- starting position in the listpageSize
- maximum number of data fields that can be returned.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:
- list of DataField objects
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.UserNotAuthorizedException
- user not authorized to issue this request.PropertyServerException
- there was a problem that occurred within the property server.
-
getLinkedDataFields
public List<B> getLinkedDataFields(String userId, String dataFieldGUID, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return any peer data fields attached to this data field.- Parameters:
userId
- identifier of calling userdataFieldGUID
- starting data field identifierstartingFrom
- starting position in the listpageSize
- maximum number of data fields that can be returned.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:
- list of DataField objects
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.UserNotAuthorizedException
- user not authorized to issue this request.PropertyServerException
- there was a problem that occurred within the property server.
-
getDataField
public B getDataField(String userId, String dataFieldGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return a specific data field stored in the metadata repositories. This includes information from the entity- Parameters:
userId
- calling userdataFieldGUID
- unique identifier of the data fieldforLineage
- 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:
- data field object
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user id not authorized to issue this requestPropertyServerException
- there was a problem retrieving the data field from the annotation store.
-
addDataFieldToDiscoveryReport
public String addDataFieldToDiscoveryReport(String userId, String externalSourceGUID, String externalSourceName, String annotationGUID, int dataFieldPosition, String dataFieldName, String dataFieldType, String dataFieldDescription, List<String> dataFieldAliases, int dataFieldSortOrder, String defaultValue, Map<String, String> additionalProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionAdd a new data field to the Annotation store linked off of an annotation (typically SchemaAnalysisAnnotation).- Parameters:
userId
- identifier of calling userexternalSourceGUID
- unique identifier of the external source (null for local)externalSourceName
- unique name of the external source (null for local)annotationGUID
- unique identifier of the annotation that the data field is to be linked todataFieldPosition
- the position of the data field in the schema (if there is ordering of fields)dataFieldName
- the name of the data fielddataFieldType
- the type of the data fielddataFieldDescription
- a description of the data fielddataFieldAliases
- any aliases associated with the data fielddataFieldSortOrder
- any sort orderdefaultValue
- default value of the fieldadditionalProperties
- any additional propertiesforLineage
- 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 of new data field
- Throws:
InvalidParameterException
- the dataField is invalid or the annotation GUID points to an annotation that can not be associated with a data field.UserNotAuthorizedException
- the user id not authorized to issue this requestPropertyServerException
- there was a problem adding the data field to the Annotation store.
-
addDataFieldToDataField
public String addDataFieldToDataField(String userId, String externalSourceGUID, String externalSourceName, String parentDataFieldGUID, int dataFieldPosition, String dataFieldName, String dataFieldType, String dataFieldDescription, List<String> dataFieldAliases, int dataFieldSortOrder, String defaultValue, Map<String, String> additionalProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionAdd a new data field and link it to an existing data field.- Parameters:
userId
- identifier of calling userexternalSourceGUID
- unique identifier of the external source (null for local)externalSourceName
- unique name of the external source (null for local)parentDataFieldGUID
- unique identifier of the data field that this new one is to be attached todataFieldPosition
- the position of the data field in the schema (if there is ordering of fields)dataFieldName
- the name of the data fielddataFieldType
- the type of the data fielddataFieldDescription
- a description of the data fielddataFieldAliases
- any aliases associated with the data fielddataFieldSortOrder
- any sort orderdefaultValue
- default value of the fieldadditionalProperties
- any additional propertiesforLineage
- 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 of new data field
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user id not authorized to issue this requestPropertyServerException
- there was a problem saving data fields in the annotation store.
-
linkDataFields
public void linkDataFields(String userId, String externalSourceGUID, String externalSourceName, String linkFromDataFieldGUID, String linkToDataFieldGUID, int relationshipEnd, String relationshipTypeName, Map<String, String> additionalProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionAdd a new data field and link it to an existing data field.- Parameters:
userId
- identifier of calling userexternalSourceGUID
- unique identifier of the external source (null for local)externalSourceName
- unique name of the external source (null for local)linkFromDataFieldGUID
- unique identifier of the data field that is at end 1 of the relationshiplinkToDataFieldGUID
- unique identifier of the data field that is at end 2 of the relationshiprelationshipEnd
- the logical end of the relationship. Use 0 if this does not make sense.relationshipTypeName
- the name of this relationship between data fields.additionalProperties
- any additional propertiesforLineage
- 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 invalidUserNotAuthorizedException
- the user id not authorized to issue this requestPropertyServerException
- there was a problem saving data fields in the annotation store.
-
updateDataField
public void updateDataField(String userId, String externalSourceGUID, String externalSourceName, String dataFieldGUID, boolean isMergeUpdate, String dataFieldName, String dataFieldType, String dataFieldDescription, List<String> dataFieldAliases, int dataFieldSortOrder, String defaultValue, Map<String, String> additionalProperties, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionReplace the current properties of a data field.- Parameters:
userId
- identifier of calling userexternalSourceGUID
- unique identifier of the external source (null for local)externalSourceName
- unique name of the external source (null for local)dataFieldGUID
- unique identifier of the data fieldisMergeUpdate
- flag to indicate whether all properties should be updated, or just the properties specified.dataFieldName
- the name of the data fielddataFieldType
- the type of the data fielddataFieldDescription
- a description of the data fielddataFieldAliases
- any aliases associated with the data fielddataFieldSortOrder
- any sort orderdefaultValue
- default value of the fieldadditionalProperties
- any additional propertieseffectiveFrom
- 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 invalidUserNotAuthorizedException
- the user id not authorized to issue this requestPropertyServerException
- there was a problem updating the data field in the annotation store.
-
deleteDataField
public void deleteDataField(String userId, String externalSourceGUID, String externalSourceName, String dataFieldGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a data field from the metadata repositories.- Parameters:
userId
- identifier of calling userexternalSourceGUID
- unique identifier of the external source (null for local)externalSourceName
- unique name of the external source (null for local)dataFieldGUID
- unique identifier of the data fieldforLineage
- 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 invalidUserNotAuthorizedException
- the user id not authorized to issue this requestPropertyServerException
- there was a problem deleting the data field from the annotation store.
-