Class ReferenceableHandler<B>

Direct Known Subclasses:
AnnotationHandler, AssetHandler, ConnectionHandler, ConnectorTypeHandler, EndpointHandler, ExternalIdentifierHandler, MetadataElementHandler, SchemaAttributeHandler, SchemaTypeHandler, SoftwareCapabilityHandler, ValidValuesHandler

public class ReferenceableHandler<B> extends OpenMetadataAPITemplateHandler<B>
ReferenceableHandler manages methods on generic referenceables.
  • 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 class
      beanClass - name of bean class that is represented by the generic class B
      serviceName - name of this service
      serverName - name of the local server
      invalidParameterHandler - handler for managing parameter errors
      repositoryHandler - manages calls to the repository services
      repositoryHelper - provides utilities for manipulating the repository services objects
      localServerUserId - userId for this server
      securityVerifier - open metadata security services verifier
      supportedZones - 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 user
      typeGUID - 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 for
      nameParameterName - property that provided the name
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - 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 user
      typeGUID - 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 for
      nameParameterName - property that provided the name
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - 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 user
      typeGUID - 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 for
      nameParameterName - property that provided the name
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - 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 user
      typeGUID - 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 for
      nameParameterName - property that provided the name
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - 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 user
      beanGUID - unique identifier of bean
      beanGUIDParameterName - name of parameter supplying the beanGUID
      beanGUIDTypeName - type of bean
      owner - name of the owner
      ownerTypeName - type of element that owner comes from
      ownerPropertyName - name of property used to identify owner
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      Throws:
      InvalidParameterException - entity not known, null userId or guid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - 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 user
      element1GUID - unique identifier of first element
      element1GUIDParameter - name of parameter supplying element1GUID
      element2GUID - unique identifier of second element
      element2GUIDParameter - name of parameter supplying element2GUID
      setKnownDuplicate - 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 steward
      stewardTypeName - type of element used to identify the steward
      stewardPropertyName - property name used to identify steward
      source - source of the duplicate detection processing
      notes - notes for the steward
      serviceSupportedZones - list of supported zones for this service
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is null or invalid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - 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 user
      element1GUID - unique identifier of first element
      element1GUIDParameter - name of parameter supplying element1GUID
      element2GUID - unique identifier of second element
      element2GUIDParameter - name of parameter supplying element2GUID
      serviceSupportedZones - list of supported zones for this service
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is null or invalid or the elements are not linked as duplicates
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - 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 user
      consolidatedElementGUID - unique identifier of the metadata element
      consolidatedElementGUIDParameter - parameter name to use for the requested GUID
      statusIdentifier - what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)
      steward - identifier of the steward
      stewardTypeName - type of element used to identify the steward
      stewardPropertyName - property name used to identify steward
      source - source of the duplicate detection processing
      notes - notes for the steward
      sourceElementGUIDs - 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 GUIDs
      serviceSupportedZones - list of supported zones for this service
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is null or invalid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - 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, PropertyServerException
      Create the property facet for the vendor properties.
      Parameters:
      userId - calling user
      referenceableGUID - unique identifier of the software capability
      vendorProperties - properties for the vendor
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is null or invalid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - 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 user
      referenceableGUID - unique identifier of the metadata element
      referenceableGUIDParameter - parameter name for referenceableGUID
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      Returns:
      map of properties
      Throws:
      InvalidParameterException - one of the parameters is null or invalid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem