java.lang.Object
org.odpi.openmetadata.frameworkservices.omf.client.handlers.ActorRoleHandler
Direct Known Subclasses:
ActorRoleManagement

public class ActorRoleHandler extends Object
ActorRoleHandler provides methods to define actor roles The interface supports the following types of objects
  • ActorRole
  • PersonRole
  • TeamRole
  • ITProfileRole
  • GovernanceRole
  • SolutionRole
  • Constructor Details

    • ActorRoleHandler

      public ActorRoleHandler(String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize, boolean createSolutionRoles) throws InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      localServerName - name of this server (view server)
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      auditLog - logging destination
      accessServiceURLMarker - which access service to call
      serviceName - local service name
      maxPageSize - maximum number of results supported by this server
      Throws:
      InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • ActorRoleHandler

      public ActorRoleHandler(String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize, boolean createSolutionRoles) throws InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      maxPageSize - maximum number of results supported by this server
      auditLog - logging destination
      Throws:
      InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
  • Method Details

    • createActorRole

      public String createActorRole(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, boolean isOwnAnchor, String anchorScopeGUID, ActorRoleProperties properties, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Create a new actor role.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      anchorGUID - unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.
      isOwnAnchor - boolean flag to day that the element should be classified as its own anchor once its element is created in the repository.
      anchorScopeGUID - unique identifier of any anchor scope to use for searching
      properties - properties for the new element.
      parentGUID - unique identifier of optional parent entity
      parentRelationshipTypeName - type of relationship to connect the new element to the parent
      parentRelationshipProperties - properties to include in parent relationship
      parentAtEnd1 - which end should the parent GUID go in the relationship
      forLineage - the retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      Returns:
      unique identifier of the newly created element
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • createActorRoleFromTemplate

      public String createActorRoleFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, boolean isOwnAnchor, String anchorScopeGUID, Date effectiveFrom, Date effectiveTo, String templateGUID, ElementProperties replacementProperties, Map<String,String> placeholderProperties, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent an actor role using an existing element as a template. The template defines additional classifications and relationships that should be added to the new actor role.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      anchorGUID - unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.
      isOwnAnchor - boolean flag to day that the element should be classified as its own anchor once its element is created in the repository.
      anchorScopeGUID - unique identifier of any anchor scope to use for searching
      effectiveFrom - the date when this element is active - null for active on creation
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      templateGUID - the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)
      replacementProperties - properties of the new metadata element. These override the template values
      placeholderProperties - property name-to-property value map to replace any placeholder values in the template element - and their anchored elements, which are also copied as part of this operation.
      parentGUID - unique identifier of optional parent entity
      parentRelationshipTypeName - type of relationship to connect the new element to the parent
      parentRelationshipProperties - properties to include in parent relationship
      parentAtEnd1 - which end should the parent GUID go in the relationship
      forLineage - the retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      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)
    • updateActorRole

      public void updateActorRole(String userId, String externalSourceGUID, String externalSourceName, String actorRoleGUID, boolean replaceAllProperties, ActorRoleProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Update the properties of an actor role.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      actorRoleGUID - unique identifier of the actor role (returned from create)
      replaceAllProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.
      properties - properties for the element.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      PropertyServerException - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • linkPersonRoleToProfile

      public void linkPersonRoleToProfile(String userId, String externalSourceGUID, String externalSourceName, String personRoleGUID, String personProfileGUID, PersonRoleAppointmentProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Attach a person role to a person profile.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      personRoleGUID - unique identifier of the person role
      personProfileGUID - unique identifier of the person profile
      relationshipProperties - description of the relationship.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      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.
    • detachPersonRoleFromProfile

      public void detachPersonRoleFromProfile(String userId, String externalSourceGUID, String externalSourceName, String personRoleGUID, String personProfileGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Detach a person role from a profile.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      personRoleGUID - unique identifier of the person role
      personProfileGUID - unique identifier of the person profile
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      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.
    • linkTeamRoleToProfile

      public void linkTeamRoleToProfile(String userId, String externalSourceGUID, String externalSourceName, String teamRoleGUID, String teamProfileGUID, TeamRoleAppointmentProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Attach a team role to a team profile.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      teamRoleGUID - unique identifier of the team role
      teamProfileGUID - unique identifier of the team profile
      relationshipProperties - description of the relationship.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      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.
    • detachTeamRoleFromProfile

      public void detachTeamRoleFromProfile(String userId, String externalSourceGUID, String externalSourceName, String teamRoleGUID, String teamProfileGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Detach a team role from a team profile.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      teamRoleGUID - unique identifier of the team
      teamProfileGUID - unique identifier of the team profile
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      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.
    • linkITProfileRoleToProfile

      public void linkITProfileRoleToProfile(String userId, String externalSourceGUID, String externalSourceName, String itProfileRoleGUID, String itProfileGUID, ITProfileRoleAppointmentProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Attach an IT profile role to an IT profile.
      Parameters:
      userId - userId of user making request
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      itProfileRoleGUID - unique identifier of the IT profile role
      itProfileGUID - unique identifier of the IT profile
      relationshipProperties - description of the relationship.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      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.
    • detachITProfileRoleFromProfile

      public void detachITProfileRoleFromProfile(String userId, String externalSourceGUID, String externalSourceName, String itProfileRoleGUID, String itProfileGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Detach an IT profile role from an IT profile.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      itProfileRoleGUID - unique identifier of the IT profile role
      itProfileGUID - unique identifier of the IT profile
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      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.
    • deleteActorRole

      public void deleteActorRole(String userId, String externalSourceGUID, String externalSourceName, String actorRoleGUID, boolean cascadedDelete, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Delete a actor role.
      Parameters:
      userId - userId of user making request.
      externalSourceGUID - unique identifier of the software capability that owns this element
      externalSourceName - unique name of the software capability that owns this element
      actorRoleGUID - unique identifier of the element
      cascadedDelete - can the actor role be deleted if it has solution components linked to it?
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      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.
    • getActorRolesByName

      public List<ActorRoleElement> getActorRolesByName(String userId, String name, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Returns the list of actor roles with a particular name.
      Parameters:
      userId - userId of user making request
      name - name of the element to return - match is full text match in qualifiedName or name
      templateFilter - should templates be returned?
      limitResultsByStatus - control the status of the elements to retrieve - default is everything but Deleted
      asOfTime - repository time to use
      sequencingOrder - order to retrieve results
      sequencingProperty - property to use for sequencing order
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      Returns:
      a list of elements
      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.
    • getActorRoleByGUID

      public ActorRoleElement getActorRoleByGUID(String userId, String actorRoleGUID, Date asOfTime, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return the properties of a specific actor role.
      Parameters:
      userId - userId of user making request
      actorRoleGUID - unique identifier of the required element
      asOfTime - repository time to use
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query 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)
      Returns:
      retrieved properties
      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.
    • findActorRoles

      public List<ActorRoleElement> findActorRoles(String userId, String searchString, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of actor roles metadata elements that contain the search string and show which solution components (if any) are attached to it. The returned actor roles include a list of the components that are associated with it. The search string is treated as a regular expression.
      Parameters:
      userId - calling user
      searchString - string to find in the properties
      templateFilter - should templates be returned?
      limitResultsByStatus - control the status of the elements to retrieve - default is everything but Deleted
      asOfTime - repository time to use
      sequencingOrder - order to retrieve results
      sequencingProperty - property to use for sequencing order
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - the retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      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)