Class ActorProfileHandler<B>

Type Parameters:
B - class that represents the profile

public class ActorProfileHandler<B> extends ReferenceableHandler<B>
ActorProfileHandler provides the exchange of metadata about actor profiles between the repository and the OMAS.
  • Constructor Details

    • ActorProfileHandler

      public ActorProfileHandler(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 with information needed to work with B objects.
      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 B instances from
      defaultZones - list of zones that the access service should set in all new B instances
      publishZones - list of zones that the access service sets up in published B instances
      auditLog - destination for audit log events
  • Method Details

    • createActorProfile

      public String createActorProfile(String userId, String externalSourceGUID, String externalSourceName, String qualifiedName, String name, String description, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, Date effectiveFrom, Date effectiveTo, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create the anchor object that all elements in a profile (terms and categories) are linked to.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      qualifiedName - unique name for the profile - used in other configuration
      name - short display name for the profile
      description - description of the governance profile
      additionalProperties - additional properties for a profile
      suppliedTypeName - type name from the caller (enables creation of subtypes)
      extendedProperties - properties for a governance profile subtype
      effectiveFrom - 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 the new profile object
      Throws:
      InvalidParameterException - qualifiedName or userId is null
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • createActorProfileFromTemplate

      public String createActorProfileFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String templateGUID, String qualifiedName, String name, String description, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a profile using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new profile. All categories and terms are linked to a single profile. They are owned by this profile and if the profile is deleted, any linked terms and categories are deleted as well.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      templateGUID - unique identifier of the metadata element to copy
      qualifiedName - unique name for the profile - used in other configuration
      name - short display name for the profile
      description - description of the governance profile
      methodName - calling method
      Returns:
      unique identifier of the new metadata element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • updateActorProfile

      public void updateActorProfile(String userId, String externalSourceGUID, String externalSourceName, String profileGUID, String profileGUIDParameterName, String qualifiedName, String name, String description, Map<String,String> additionalProperties, String typeName, Map<String,Object> extendedProperties, boolean isMergeUpdate, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the anchor object that all elements in a profile (terms and categories) are linked to.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      profileGUID - unique identifier of the profile to update
      profileGUIDParameterName - parameter passing the profileGUID
      qualifiedName - unique name for the profile - used in other configuration
      name - short display name for the profile
      description - description of the governance profile
      additionalProperties - additional properties for a governance profile
      typeName - type of profile
      extendedProperties - properties for a governance profile subtype
      isMergeUpdate - should the supplied properties be merged with existing properties (true) only replacing the properties with matching names, or should the entire properties of the instance be replaced?
      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
      Throws:
      InvalidParameterException - qualifiedName or userId is null
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • linkPeerPersonProfiles

      public void linkPeerPersonProfiles(String userId, String externalSourceGUID, String externalSourceName, String profile1GUID, String profile1GUIDParameterName, String profile2GUID, String profile2GUIDParameterName, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Link two person profiles as peers.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      profile1GUID - unique identifier of person profile
      profile1GUIDParameterName - parameter name supplying profile1GUID
      profile2GUID - unique identifier of the other person profile
      profile2GUIDParameterName - parameter name supplying profile2GUID
      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
      Throws:
      InvalidParameterException - entity not known, null userId or guid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • unlinkPeerPersonProfiles

      public void unlinkPeerPersonProfiles(String userId, String externalSourceGUID, String externalSourceName, String profile1GUID, String profile1GUIDParameterName, String profile2GUID, String profile2GUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Unlink two person profiles as peers.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      profile1GUID - unique identifier of person profile
      profile1GUIDParameterName - parameter name supplying profile1GUID
      profile2GUID - unique identifier of the other person profile
      profile2GUIDParameterName - parameter name supplying profile2GUID
      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 - entity not known, null userId or guid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • linkTeamHierarchy

      public void linkTeamHierarchy(String userId, String externalSourceGUID, String externalSourceName, String superTeamGUID, String superTeamGUIDParameterName, String subTeamGUID, String subTeamGUIDParameterName, boolean delegationEscalationAuthority, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Link two team profiles as part of a hierarchy.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      superTeamGUID - unique identifier of team profile
      superTeamGUIDParameterName - parameter name supplying superTeamGUID
      subTeamGUID - unique identifier of the other team profile
      subTeamGUIDParameterName - parameter name supplying subTeamGUID
      delegationEscalationAuthority - can workflows delegate/escalate through this link?
      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
      Throws:
      InvalidParameterException - entity not known, null userId or guid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • unlinkTeamHierarchy

      public void unlinkTeamHierarchy(String userId, String externalSourceGUID, String externalSourceName, String superTeamGUID, String superTeamGUIDParameterName, String subTeamGUID, String subTeamGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Unlink two team profiles from the hierarchy.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      superTeamGUID - unique identifier of team profile
      superTeamGUIDParameterName - parameter name supplying superTeamGUID
      subTeamGUID - unique identifier of the other team profile
      subTeamGUIDParameterName - parameter name supplying subTeamGUID
      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 - entity not known, null userId or guid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • removeActorProfile

      public void removeActorProfile(String userId, String externalSourceGUID, String externalSourceName, String profileGUID, String profileGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a profile. This will delete the profile and all categories and terms because the Anchors classifications are set up in these elements.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      profileGUID - unique identifier of the metadata element to remove
      profileGUIDParameterName - parameter supplying the profileGUID
      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 invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • findActorProfiles

      public List<B> findActorProfiles(String userId, String searchString, String searchStringParameterName, String typeGUID, String typeName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of profile metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      userId - calling user
      searchString - string to find in the properties
      searchStringParameterName - name of parameter supplying the search string
      typeGUID - unique identifier of the type of the profile to retrieve
      typeName - unique name of the type of the profile to retrieve
      startFrom - paging start point
      pageSize - maximum 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 matching metadata elements
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getActorProfilesByName

      public List<B> getActorProfilesByName(String userId, String name, String nameParameterName, String typeGUID, String typeName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of profile metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      userId - calling user
      name - name to search for
      nameParameterName - parameter supplying name
      typeGUID - unique identifier of the type of the profile to retrieve
      typeName - unique name of the type of the profile to retrieve
      startFrom - paging start point
      pageSize - maximum 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 matching metadata elements
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getActorsForProject

      public List<B> getActorsForProject(String userId, String projectGUID, String projectGUIDParameterName, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return the actors attached to a supplied project via the project team relationship.
      Parameters:
      userId - calling user
      projectGUID - identifier for the entity that the actor profiles are attached to
      projectGUIDParameterName - 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
    • getActorProfilesByLocation

      public List<B> getActorProfilesByLocation(String userId, String elementGUID, String elementGUIDParameterName, String elementTypeName, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return the locations attached to an actor profile.
      Parameters:
      userId - calling user
      elementGUID - identifier for the entity that the feedback is attached to
      elementGUIDParameterName - name of parameter supplying the GUID
      elementTypeName - name of the type of object being attached to
      startingFrom - where to start from in the list
      pageSize - maximum number of results that can be returned
      forLineage - 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 retrieved 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
    • getActorProfiles

      public List<B> getActorProfiles(String userId, String elementTypeGUID, String elementTypeName, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return all the actor profiles.
      Parameters:
      userId - calling user
      elementTypeGUID - identifier of the type of object to retrieve
      elementTypeName - name of the type of object to retrieve
      startingFrom - where to start from in the list
      pageSize - maximum number of results that can be returned
      forLineage - 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 retrieved 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
    • getActorProfileByGUID

      public B getActorProfileByGUID(String userId, String guid, String guidParameterName, String typeName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the profile metadata element with the supplied unique identifier. This method only returns the core profile information from the ActorProfile entity.
      Parameters:
      userId - calling user
      guid - unique identifier of the requested metadata element
      guidParameterName - parameter name of guid
      typeName - unique name of the type of the profile to retrieve
      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:
      matching metadata element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getActorProfileForUser

      public B getActorProfileForUser(String userId, String profileUserId, String profileUserIdParameterName, String typeName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the profile metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      profileUserId - unique name of the linked user id
      profileUserIdParameterName - parameter name of profileUserId
      typeName - unique name of the type of the profile to retrieve
      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:
      matching metadata element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getActorProfileByUniqueName

      public B getActorProfileByUniqueName(String userId, String qualifiedName, String qualifiedNameParameterName, String typeGUID, String typeName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the profile metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      qualifiedName - unique name of the linked user id
      qualifiedNameParameterName - parameter name of qualifiedName
      typeGUID - unique identifier of type of profile
      typeName - unique name of type of profile
      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:
      matching metadata element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)