Class ContactDetailsHandler<B>


public class ContactDetailsHandler<B> extends OpenMetadataAPIGenericHandler<B>
ContactDetailHandler manages the ContactDetails entity. The ContactDetails entity describes a contact method for an actor profile.
  • Constructor Details

    • ContactDetailsHandler

      public ContactDetailsHandler(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

    • getContactDetails

      public List<B> getContactDetails(String userId, String profileGUID, String profileGUIDParameterName, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return the ContactDetails attached to a supplied actor profile.
      Parameters:
      userId - calling user
      profileGUID - identifier for the entity that the contact details are attached to
      profileGUIDParameterName - name of parameter supplying the GUID
      startingFrom - where to start from in the list
      pageSize - maximum number of results that can be returned
      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 (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      list of objects or null if none found
      Throws:
      InvalidParameterException - the input properties are invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server
    • createContactMethod

      public String createContactMethod(String userId, String externalSourceGUID, String externalSourceName, String profileGUID, String profileGUIDParameterName, String contactName, String contactType, int contactMethodType, String contactMethodService, String contactMethodValue, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Create a new contact method for a profile.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      profileGUID - unique identifier for the connected entity (Referenceable).
      profileGUIDParameterName - parameter supplying the profileGUID
      contactName - name of this contact method - eg my office phone number
      contactType - type of contact eg "Office phone number" - typically controlled from a valid value set
      contactMethodType - ordinal for contact type
      contactMethodService - name of the service to call
      contactMethodValue - identity value to use for this profile through this contact method
      effectiveFrom - 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 returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      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 the contact method
      Throws:
      InvalidParameterException - the endpoint bean properties are invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server
    • removeContactDetail

      public void removeContactDetail(String userId, String externalSourceGUID, String externalSourceName, String contactMethodGUID, String contactMethodGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Remove the requested contact method.
      Parameters:
      userId - calling user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      contactMethodGUID - unique identifier for the connected entity (Referenceable).
      contactMethodGUIDParameterName - parameter supplying the contactMethodGUID
      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 (null for any time, new Date() for now)
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server