Class ExternalReferenceHandler<B>
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler<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.ExternalReferenceHandler<B>
ExternalReferenceHandler manages ExternalReference objects. It runs server-side in
the OMAG Server Platform and retrieves ExternalReference entities through the OMRSRepositoryConnector.
-
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
ConstructorDescriptionExternalReferenceHandler
(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 TypeMethodDescriptioncreateExternalReference
(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, String qualifiedName, String displayName, String description, String url, String referenceVersion, String organization, Map<String, String> additionalProperties, String suppliedTypeName, Map<String, Object> extendedProperties, Date effectiveFrom, Date effectiveTo, Date effectiveTime, String methodName) Create a definition of a external reference.findExternalReferences
(String userId, String searchString, String searchStringParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Retrieve the list of metadata elements that contain the search string.getExternalReferenceByQualifiedName
(String userId, String qualifiedName, String qualifiedNameParameter, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return information about a specific external reference.getExternalReferences
(String userId, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return information about the defined external references.getExternalReferencesById
(String userId, String referenceId, String referenceIdParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Retrieve the list of external reference metadata elements with a matching referenceId.getExternalReferencesByName
(String userId, String name, String nameParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Retrieve the list of external reference metadata elements with a matching name.getExternalReferencesByURL
(String userId, String url, String urlParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Retrieve the list of external reference metadata elements with a matching url.void
removeExternalReference
(String userId, String externalSourceGUID, String externalSourceName, String externalReferenceGUID, String externalReferenceGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Remove the metadata element representing an external reference.void
updateExternalReference
(String userId, String externalSourceGUID, String externalSourceName, String externalReferenceGUID, String externalReferenceGUIDParameterName, String qualifiedName, String displayName, String description, String url, String referenceVersion, String organization, Map<String, String> additionalProperties, String suppliedTypeName, Map<String, Object> extendedProperties, Date effectiveFrom, Date effectiveTo, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Update the external reference.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler
addAssignmentScope, addDataFieldValuesClassification, addGovernanceActionClassification, addGovernanceDefinitionScope, addGovernanceExpectationsClassification, addGovernanceMeasurementsClassification, addGovernedBy, addImplementedBy, addMoreInformation, addOwner, addRetentionClassification, addSecurityTags, addStakeholder, addSubjectAreaClassification, addTemplateClassification, clearBusinessSignificant, findBeanGUIDsByQualifiedName, findBeansByQualifiedName, findBeansByQualifiedName, getAssignedActors, getAssignmentScope, getBeanByQualifiedName, getBeanByQualifiedName, getBeanGUIDByQualifiedName, getBeanGUIDByQualifiedName, getBeanGUIDsByQualifiedName, getBeanGUIDsByQualifiedName, getBeansByQualifiedName, getBeansByQualifiedName, getCatalogTemplateList, getCollectionMembers, getCommissionedByStakeholder, getDataFieldValuesClassifiedElement, getDescriptiveElements, getElementsSourceFrom, getEntityByUniqueQualifiedName, getGovernanceActionClassifiedElements, getGovernanceDefinitionScope, getGovernedElements, getMeanings, getMoreInformation, getMoreInformation, getOwnersElements, getReferenceValueAssignees, getResourceList, getRetentionClassifiedElements, getSecurityTagsClassifiedElements, getSemanticAssignments, getSourceElements, getStakeholders, getSubjectAreaMembers, getSubjectAreaMembers, getSupportedByResource, getSupportedByTemplate, getValidValueConsumers, getVendorProperties, linkConsolidatedDuplicate, linkElementsAsPeerDuplicates, removeAssignmentScope, removeCatalogTemplate, removeDataFieldValuesClassification, removeGovernanceActionClassification, removeGovernanceDefinitionScope, removeGovernanceExpectationsClassification, removeGovernanceMeasurementsClassification, removeGovernedBy, removeImplementedBy, removeMoreInformation, removeOwner, removeResourceListMember, removeRetentionClassification, removeSecurityTags, removeSemanticAssignment, removeStakeholder, removeSubjectAreaClassification, removeTemplateClassification, saveCatalogTemplate, saveResourceListMember, saveSemanticAssignment, saveSemanticAssignment, saveSemanticAssignments, setBusinessSignificant, setVendorProperties, unlinkElementsAsPeerDuplicates
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPITemplateHandler
createBeanFromTemplate, createBeanFromTemplate
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
-
ExternalReferenceHandler
public ExternalReferenceHandler(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
-
createExternalReference
public String createExternalReference(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, String qualifiedName, String displayName, String description, String url, String referenceVersion, String organization, Map<String, String> additionalProperties, String suppliedTypeName, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionObject> extendedProperties, Date effectiveFrom, Date effectiveTo, Date effectiveTime, String methodName) Create a definition of a external reference.- 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 sourceanchorGUID
- optional element to link the external reference to that will act as an anchor - that is, this external reference will be deleted when the element is deleted (once the external reference is linked to the anchor).qualifiedName
- unique name for the referencedisplayName
- short display name for the referencedescription
- description of the referenceurl
- the location of the referencereferenceVersion
- version of the referenceorganization
- owning org for the referenceadditionalProperties
- additional properties for an external referencesuppliedTypeName
- type of external referenceextendedProperties
- properties for an external reference subtypeeffectiveFrom
- starting time for this relationship (null for all time)effectiveTo
- ending time for this relationship (null for all time)effectiveTime
- 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 external reference
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
updateExternalReference
public void updateExternalReference(String userId, String externalSourceGUID, String externalSourceName, String externalReferenceGUID, String externalReferenceGUIDParameterName, String qualifiedName, String displayName, String description, String url, String referenceVersion, String organization, Map<String, String> additionalProperties, String suppliedTypeName, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionObject> extendedProperties, Date effectiveFrom, Date effectiveTo, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Update the external reference.- 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 sourceexternalReferenceGUID
- unique identifier of the external reference to updateexternalReferenceGUIDParameterName
- parameter passing the externalReferenceGUIDqualifiedName
- unique name for the referencedisplayName
- short display name for the referencedescription
- description of the referenceurl
- the location of the referencereferenceVersion
- version of the referenceorganization
- owning org for the referenceadditionalProperties
- additional properties for an external referencesuppliedTypeName
- name of subtype or nullextendedProperties
- properties for a governance externalReference subtypeisMergeUpdate
- should the properties be merged with existing properties or replace the existing properties?effectiveFrom
- the date when this element is active - null for active noweffectiveTo
- the date when this element becomes inactive - null for active until deletedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
removeExternalReference
public void removeExternalReference(String userId, String externalSourceGUID, String externalSourceName, String externalReferenceGUID, String externalReferenceGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing an external reference.- 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 sourceexternalReferenceGUID
- unique identifier of the metadata element to removeexternalReferenceGUIDParameterName
- parameter supplying the externalReferenceGUIDforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- 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 is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getExternalReferenceByQualifiedName
public B getExternalReferenceByQualifiedName(String userId, String qualifiedName, String qualifiedNameParameter, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about a specific external reference.- Parameters:
userId
- calling userqualifiedName
- unique name for the external referencequalifiedNameParameter
- name of parameter supplying the qualifiedNameforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- properties of the external reference
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getExternalReferencesById
public List<B> getExternalReferencesById(String userId, String referenceId, String referenceIdParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of external reference metadata elements with a matching referenceId. There are no wildcards supported on this request.- Parameters:
userId
- calling userreferenceId
- referenceId to search forreferenceIdParameterName
- parameter supplying referenceIdstartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getExternalReferencesByName
public List<B> getExternalReferencesByName(String userId, String name, String nameParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of external reference metadata elements with a matching name. There are no wildcards supported on this request.- Parameters:
userId
- calling username
- name to search fornameParameterName
- parameter supplying namestartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getExternalReferencesByURL
public List<B> getExternalReferencesByURL(String userId, String url, String urlParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of external reference metadata elements with a matching url. There are no wildcards supported on this request.- Parameters:
userId
- calling userurl
- url to search forurlParameterName
- parameter supplying urlstartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getExternalReferences
public List<B> getExternalReferences(String userId, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the defined external references.- Parameters:
userId
- calling userstartingFrom
- position in the list (used when there are so many reports that paging is neededpageSize
- maximum number of elements to return an this callforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- properties of the external reference
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
findExternalReferences
public List<B> findExternalReferences(String userId, String searchString, String searchStringParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
userId
- calling usersearchString
- string to find in the propertiessearchStringParameterName
- name of parameter supplying the search stringstartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?effectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- calling method- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-