Class ReferenceableHandler<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>
- Direct Known Subclasses:
AnnotationHandler
,AssetHandler
,ConnectionHandler
,ConnectorTypeHandler
,EndpointHandler
,ExternalIdentifierHandler
,MetadataElementHandler
,SchemaAttributeHandler
,SchemaTypeHandler
,SoftwareCapabilityHandler
,ValidValuesHandler
ReferenceableHandler manages methods on generic referenceables.
-
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
ConstructorsConstructorDescriptionReferenceableHandler
(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
addOwner
(String userId, String beanGUID, String beanGUIDParameterName, String beanGUIDTypeName, String owner, String ownerTypeName, String ownerPropertyName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Add or replace the ownership for a referenceable.getBeanByQualifiedName
(String userId, String typeGUID, String typeName, String name, String nameParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return the bean with the requested qualified name.getBeanByQualifiedName
(String userId, String typeGUID, String typeName, String name, String nameParameterName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) Return the bean with the requested qualified name.getBeanGUIDByQualifiedName
(String userId, String typeGUID, String typeName, String name, String nameParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return the unique identifier of the bean with the requested qualified name.getBeanGUIDByQualifiedName
(String userId, String typeGUID, String typeName, String name, String nameParameterName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) Return the bean with the requested qualified name.getVendorProperties
(String userId, String referenceableGUID, String referenceableGUIDParameter, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Retrieve the property facet for the vendor properties.void
linkConsolidatedDuplicate
(String userId, String consolidatedElementGUID, String consolidatedElementGUIDParameter, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, List<String> sourceElementGUIDs, String sourceElementGUIDsParameterName, List<String> serviceSupportedZones, String methodName) Identify an element that acts as a consolidated version for a set of duplicate elements.void
linkElementsAsPeerDuplicates
(String userId, String element1GUID, String element1GUIDParameter, String element2GUID, String element2GUIDParameter, boolean setKnownDuplicate, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, List<String> serviceSupportedZones, String methodName) Create a simple relationship between two elements in an Asset description (typically the asset itself or attributes in their schema).void
setVendorProperties
(String userId, String referenceableGUID, Map<String, String> vendorProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Create the property facet for the vendor properties.void
unlinkElementsAsPeerDuplicates
(String userId, String element1GUID, String element1GUIDParameter, String element2GUID, String element2GUIDParameter, List<String> serviceSupportedZones, String methodName) Remove the relationship between two elements that marks them as duplicates.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPITemplateHandler
createBeanFromTemplate, createBeanFromTemplate
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
addAnchorGUIDToBuilder, archiveBeanInRepository, archiveBeanInRepository, countAttachments, createBeanInRepository, createBeanInRepository, deleteAnchoredBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteIfAppropriatelyAnchoredEntity, deleteRelationship, findAttachmentLinks, findBeans, findBeans, findBeans, findEntities, findEntities, findEntities, findEntities, getAllAttachmentLinks, getAllRelatedEntities, getAttachedElement, getAttachedElementGUID, getAttachedElementGUID, getAttachedElementGUIDs, getAttachedElementGUIDs, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntities, getAttachedEntity, getAttachedEntity, getAttachmentLink, getAttachmentLink, getAttachmentLinks, getAttachmentLinks, getAttachmentLinks, getBeanByUniqueName, getBeanByUniqueName, getBeanByValue, getBeanFromEntity, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDByUniqueName, getBeanGUIDsByClassification, getBeanHistory, getBeansByIntValue, getBeansByType, getBeansByType, getBeansByValue, getBeansByValue, getEntitiesByIntValue, getEntitiesByType, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityFromRepository, getEntityGUIDByValue, getEntityGUIDsByValue, getRelatedEntities, getRelationshipHistory, getSpecification, getSupplementaryProperties, getUniqueAttachmentLink, getUniqueAttachmentLink, getValidatedBeans, getValidatedEntities, getValidatedEntities, linkElementToElement, linkElementToElement, linkElementToElement, multiLinkElementToElement, relinkElementToNewElement, relinkElementToNewElement, removeClassificationFromRepository, removeClassificationFromRepository, removeCollectionMembers, removeDataStructureMembers, removeDeployedAssets, removeFolderContents, removeLinkedDatabaseSchemas, removeLinkedDataClasses, removeNestedComments, removeNestedDataFields, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, uncheckedLinkElementToElement, undoBeanUpdateInRepository, undoBeanUpdateInRepository, undoBeanUpdateInRepository, unlinkAllElements, unlinkConnectedElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, updateBeanEffectivityDates, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, updateBeanStatusInRepository, updateClassificationEffectivityDates, updateElementToElementLink, updateElementToElementLink, updateElementToElementLink, updateRelationshipEffectivityDates, updateRelationshipProperties, validateAnchorEntity, validateAnchorGUID, validateEntitiesAndAnchorsForRead, validateEntityAndAnchorForRead, validateEntityAndAnchorForRead, validateRelationship, validateUniqueProperty, verifyExternalSourceIdentity
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
-
ReferenceableHandler
public ReferenceableHandler(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
-
getBeanGUIDByQualifiedName
public String getBeanGUIDByQualifiedName(String userId, String typeGUID, String typeName, String name, String nameParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the unique identifier of the bean with the requested qualified name. The match is exact. It uses the supportedZones supplied with the service.- Parameters:
userId
- calling usertypeGUID
- unique identifier of the asset type to search for (null for the generic Asset type)typeName
- unique identifier of the asset type to search for (null for the generic Asset type)name
- name to search fornameParameterName
- property that provided the nameforLineage
- 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 formethodName
- calling method- Returns:
- matching B bean
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getBeanGUIDByQualifiedName
public String getBeanGUIDByQualifiedName(String userId, String typeGUID, String typeName, String name, String nameParameterName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the bean with the requested qualified name. The match is exact.- Parameters:
userId
- calling usertypeGUID
- unique identifier of the asset type to search for (null for the generic Asset type)typeName
- unique identifier of the asset type to search for (null for the generic Asset type)name
- name to search fornameParameterName
- property that provided the nameforLineage
- 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 deduplicateserviceSupportedZones
- list of supported zones for this serviceeffectiveTime
- the time that the retrieved elements must be effective formethodName
- calling method- Returns:
- matching B bean
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getBeanByQualifiedName
public B getBeanByQualifiedName(String userId, String typeGUID, String typeName, String name, String nameParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the bean with the requested qualified name. The match is exact. It uses the supportedZones supplied with the service.- Parameters:
userId
- calling usertypeGUID
- unique identifier of the asset type to search for (null for the generic Asset type)typeName
- unique identifier of the asset type to search for (null for the generic Asset type)name
- name to search fornameParameterName
- property that provided the nameforLineage
- 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 formethodName
- calling method- Returns:
- matching B bean
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getBeanByQualifiedName
public B getBeanByQualifiedName(String userId, String typeGUID, String typeName, String name, String nameParameterName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the bean with the requested qualified name. The match is exact.- Parameters:
userId
- calling usertypeGUID
- unique identifier of the asset type to search for (null for the generic Asset type)typeName
- unique identifier of the asset type to search for (null for the generic Asset type)name
- name to search fornameParameterName
- property that provided the nameforLineage
- 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 deduplicateserviceSupportedZones
- list of supported zones for this serviceeffectiveTime
- the time that the retrieved elements must be effective formethodName
- calling method- Returns:
- matching B bean
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
addOwner
public void addOwner(String userId, String beanGUID, String beanGUIDParameterName, String beanGUIDTypeName, String owner, String ownerTypeName, String ownerPropertyName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add or replace the ownership for a referenceable.- Parameters:
userId
- calling userbeanGUID
- unique identifier of beanbeanGUIDParameterName
- name of parameter supplying the beanGUIDbeanGUIDTypeName
- type of beanowner
- name of the ownerownerTypeName
- type of element that owner comes fromownerPropertyName
- name of property used to identify ownerforLineage
- 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 formethodName
- calling method- Throws:
InvalidParameterException
- entity not known, null userId or guidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
linkElementsAsPeerDuplicates
public void linkElementsAsPeerDuplicates(String userId, String element1GUID, String element1GUIDParameter, String element2GUID, String element2GUIDParameter, boolean setKnownDuplicate, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, List<String> serviceSupportedZones, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a simple relationship between two elements in an Asset description (typically the asset itself or attributes in their schema).- Parameters:
userId
- calling userelement1GUID
- unique identifier of first elementelement1GUIDParameter
- name of parameter supplying element1GUIDelement2GUID
- unique identifier of second elementelement2GUIDParameter
- name of parameter supplying element2GUIDsetKnownDuplicate
- should the KnownDuplicate classification be set on the elements?statusIdentifier
- what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)steward
- identifier of the stewardstewardTypeName
- type of element used to identify the stewardstewardPropertyName
- property name used to identify stewardsource
- source of the duplicate detection processingnotes
- notes for the stewardserviceSupportedZones
- list of supported zones for this servicemethodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
unlinkElementsAsPeerDuplicates
public void unlinkElementsAsPeerDuplicates(String userId, String element1GUID, String element1GUIDParameter, String element2GUID, String element2GUIDParameter, List<String> serviceSupportedZones, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the relationship between two elements that marks them as duplicates.- Parameters:
userId
- calling userelement1GUID
- unique identifier of first elementelement1GUIDParameter
- name of parameter supplying element1GUIDelement2GUID
- unique identifier of second elementelement2GUIDParameter
- name of parameter supplying element2GUIDserviceSupportedZones
- list of supported zones for this servicemethodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is null or invalid or the elements are not linked as duplicatesPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
linkConsolidatedDuplicate
public void linkConsolidatedDuplicate(String userId, String consolidatedElementGUID, String consolidatedElementGUIDParameter, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, List<String> sourceElementGUIDs, String sourceElementGUIDsParameterName, List<String> serviceSupportedZones, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Identify an element that acts as a consolidated version for a set of duplicate elements. (The consolidated element is created using createMetadataElement.) Creates a simple relationship between the elements. If the ConsolidatedDuplicate classification already exists, the properties are updated.- Parameters:
userId
- calling userconsolidatedElementGUID
- unique identifier of the metadata elementconsolidatedElementGUIDParameter
- parameter name to use for the requested GUIDstatusIdentifier
- what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)steward
- identifier of the stewardstewardTypeName
- type of element used to identify the stewardstewardPropertyName
- property name used to identify stewardsource
- source of the duplicate detection processingnotes
- notes for the stewardsourceElementGUIDs
- List of the source elements that must be linked to the consolidated element. It is assumed that they already have the KnownDuplicateClassification.sourceElementGUIDsParameterName
- parameter name for the source GUIDsserviceSupportedZones
- list of supported zones for this servicemethodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
setVendorProperties
public void setVendorProperties(String userId, String referenceableGUID, Map<String, String> vendorProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate the property facet for the vendor properties.- Parameters:
userId
- calling userreferenceableGUID
- unique identifier of the software capabilityvendorProperties
- properties for the vendorforLineage
- 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 formethodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getVendorProperties
public Map<String,String> getVendorProperties(String userId, String referenceableGUID, String referenceableGUIDParameter, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the property facet for the vendor properties. It uses the supportedZones supplied with the service.- Parameters:
userId
- calling userreferenceableGUID
- unique identifier of the metadata elementreferenceableGUIDParameter
- parameter name for referenceableGUIDforLineage
- 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 formethodName
- calling method- Returns:
- map of properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-