java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.server.spring.GovernanceRolesResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/governance-program/users/{userId}") public class GovernanceRolesResource extends Object
The GovernanceRolesResource provides a Spring based server-side REST API that supports the GovernanceRolesInterface. It delegates each request to the GovernanceRolesRESTServices. This provides the server-side implementation of the Governance Program Open Metadata Assess Service (OMAS) which is used to manage the full lifecycle of a governance program.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse
    appointGovernanceRole(String serverName, String userId, String governanceRoleGUID, String profileGUID, org.odpi.openmetadata.commonservices.ffdc.rest.AppointmentRequestBody requestBody)
    Link a person to a governance role.
    org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse
    createGovernanceRole(String serverName, String userId, org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleRequestBody requestBody)
    Create the governance role appointment.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    deleteGovernanceRole(String serverName, String userId, String governanceRoleGUID, org.odpi.openmetadata.commonservices.ffdc.rest.ExternalSourceRequestBody requestBody)
    Remove the requested governance role.
    org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleAppointeesResponse
    getCurrentGovernanceRoleAppointments(String serverName, String userId, int domainIdentifier, int startFrom, int pageSize)
    Return all the governance roles and their incumbents (if any).
    org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleResponse
    getGovernanceRoleByGUID(String serverName, String userId, String governanceRoleGUID)
    Retrieve a governance role description by unique guid.
    org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRolesResponse
    getGovernanceRoleByRoleId(String serverName, String userId, String roleId)
    Retrieve the properties of a governance role using its unique name.
    org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleHistoryResponse
    getGovernanceRoleHistoryByGUID(String serverName, String userId, String governanceRoleGUID)
    Retrieve a governance role description by unique guid along with the history of who has been appointed to the role.
    org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRolesResponse
    getGovernanceRolesByDomainId(String serverName, String userId, int domainIdentifier, int startFrom, int pageSize)
    Return all the defined governance roles.
    org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRolesResponse
    getGovernanceRolesByTitle(String serverName, String userId, String title, int startFrom, int pageSize)
    Retrieve all the governance roles for a particular title.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    linkRoleToResource(String serverName, String userId, String governanceRoleGUID, String resourceGUID, org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody requestBody)
    Link a governance role to the description of a resource that the role is responsible for.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    linkRoleToResponsibility(String serverName, String userId, String governanceRoleGUID, String responsibilityGUID, org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody requestBody)
    Link a governance role to a governance control that defines a governance responsibility that a person fulfils.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    relieveGovernanceRole(String serverName, String userId, String governanceRoleGUID, String appointmentGUID, String profileGUID, org.odpi.openmetadata.commonservices.ffdc.rest.AppointmentRequestBody requestBody)
    Unlink a person from a governance role appointment.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    unlinkRoleFromResource(String serverName, String userId, String governanceRoleGUID, String resourceGUID, org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody requestBody)
    Remove the link between a governance role and a resource.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    unlinkRoleFromResponsibility(String serverName, String userId, String governanceRoleGUID, String responsibilityGUID, org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody requestBody)
    Remove the link between a governance role and a governance responsibility.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    updateGovernanceRole(String serverName, String userId, String governanceRoleGUID, boolean isMergeUpdate, org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleRequestBody requestBody)
    Update selected fields for the governance role.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GovernanceRolesResource

      public GovernanceRolesResource()
      Default constructor
  • Method Details

    • createGovernanceRole

      @PostMapping(path="/governance-roles") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createGovernanceRole(@PathVariable String serverName, @PathVariable String userId, @RequestBody org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleRequestBody requestBody)
      Create the governance role appointment.
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user.
      requestBody - properties of the governance role.
      Returns:
      Unique identifier (guid) of the governance role or InvalidParameterException the governance domain or appointment id is null or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • updateGovernanceRole

      @PostMapping(path="/governance-roles/{governanceRoleGUID}") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateGovernanceRole(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, @RequestParam boolean isMergeUpdate, @RequestBody org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleRequestBody requestBody)
      Update selected fields for the governance role.
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user.
      governanceRoleGUID - unique identifier (guid) of the governance role.
      isMergeUpdate - are unspecified properties unchanged (true) or replaced with null?
      requestBody - properties of the governance role
      Returns:
      void response or UnrecognizedGUIDException the unique identifier of the governance role is either null or invalid or InvalidParameterException the title is null or the governanceDomain/appointmentId does not match the existing values associated with the governanceRoleGUID or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • linkRoleToResponsibility

      @PostMapping(path="/governance-roles/{governanceRoleGUID}/governance-responsibility/{responsibilityGUID}/link") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse linkRoleToResponsibility(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, @PathVariable String responsibilityGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody requestBody)
      Link a governance role to a governance control that defines a governance responsibility that a person fulfils.
      Parameters:
      serverName - name of server instance to call
      userId - calling user
      governanceRoleGUID - unique identifier of the governance role
      responsibilityGUID - unique identifier of the governance responsibility control
      requestBody - relationship request body
      Returns:
      void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • unlinkRoleFromResponsibility

      @PostMapping(path="/governance-roles/{governanceRoleGUID}/governance-responsibility/{responsibilityGUID}/unlink") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse unlinkRoleFromResponsibility(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, @PathVariable String responsibilityGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody requestBody)
      Remove the link between a governance role and a governance responsibility.
      Parameters:
      serverName - name of server instance to call
      userId - calling user
      governanceRoleGUID - unique identifier of the governance role
      responsibilityGUID - unique identifier of the governance responsibility control
      requestBody - relationship request body
      Returns:
      void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • linkRoleToResource

      @PostMapping(path="/governance-roles/{governanceRoleGUID}/resource/{resourceGUID}/link") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse linkRoleToResource(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, @PathVariable String resourceGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody requestBody)
      Link a governance role to the description of a resource that the role is responsible for.
      Parameters:
      serverName - name of server instance to call
      userId - calling user
      governanceRoleGUID - unique identifier of the governance role
      resourceGUID - unique identifier of the resource description
      requestBody - relationship request body
      Returns:
      void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • unlinkRoleFromResource

      @PostMapping(path="/governance-roles/{governanceRoleGUID}/resource/{resourceGUID}/unlink") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse unlinkRoleFromResource(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, @PathVariable String resourceGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody requestBody)
      Remove the link between a governance role and a resource.
      Parameters:
      serverName - name of server instance to call
      userId - calling user
      governanceRoleGUID - unique identifier of the governance role
      resourceGUID - unique identifier of the resource description
      requestBody - relationship request body
      Returns:
      void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • deleteGovernanceRole

      @PostMapping(path="/governance-roles/{governanceRoleGUID}/delete") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse deleteGovernanceRole(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.ExternalSourceRequestBody requestBody)
      Remove the requested governance role.
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user
      governanceRoleGUID - unique identifier (guid) of the governance role
      requestBody - properties to verify this is the right governance role
      Returns:
      void response or InvalidParameterException the governanceRoleGUID null or invalid or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • getGovernanceRoleByGUID

      @GetMapping(path="/governance-roles/{governanceRoleGUID}") public org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleResponse getGovernanceRoleByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID)
      Retrieve a governance role description by unique guid.
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user
      governanceRoleGUID - unique identifier (guid) of the governance role
      Returns:
      governance role object or InvalidParameterException the unique identifier of the governance role is either null or invalid or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • getGovernanceRoleHistoryByGUID

      @GetMapping(path="/governance-roles/{governanceRoleGUID}/history") public org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleHistoryResponse getGovernanceRoleHistoryByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID)
      Retrieve a governance role description by unique guid along with the history of who has been appointed to the role.
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user
      governanceRoleGUID - unique identifier (guid) of the governance role
      Returns:
      governance role object or InvalidParameterException the unique identifier of the governance role is either null or invalid or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • getGovernanceRoleByRoleId

      @GetMapping(path="/governance-roles/by-role-id/{roleId}") public org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRolesResponse getGovernanceRoleByRoleId(@PathVariable String serverName, @PathVariable String userId, @PathVariable String roleId)
      Retrieve the properties of a governance role using its unique name. The results are returned as a list since it is possible that two roles have the same identifier due to the distributed nature of the open metadata ecosystem. By returning all the search results here it is possible to manage the duplicates through this interface.
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user
      roleId - the unique identifier (qualifiedName) of the governance role
      Returns:
      governance role object or InvalidParameterException the guid is either null or invalid or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • getGovernanceRolesByDomainId

      @GetMapping(path="/governance-roles/by-domain/{domainIdentifier}") public org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRolesResponse getGovernanceRolesByDomainId(@PathVariable String serverName, @PathVariable String userId, @PathVariable int domainIdentifier, @RequestParam int startFrom, @RequestParam int pageSize)
      Return all the defined governance roles.
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user.
      domainIdentifier - domain of interest - 0 is all domains
      startFrom - where to start from in the list of definitions
      pageSize - max number of results to return in one call
      Returns:
      list of governance role objects or InvalidParameterException the guid is either null or invalid or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • getGovernanceRolesByTitle

      @GetMapping(path="/governance-roles/by-title/{title}") public org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRolesResponse getGovernanceRolesByTitle(@PathVariable String serverName, @PathVariable String userId, @PathVariable String title, @RequestParam int startFrom, @RequestParam int pageSize)
      Retrieve all the governance roles for a particular title. The title can include regEx wildcards.
      Parameters:
      serverName - name of server instance to call
      userId - calling user
      title - short description of the role
      startFrom - where to start from in the list of definitions
      pageSize - max number of results to return in one call
      Returns:
      list of governance role objects or InvalidParameterException the title is either null or invalid or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • getCurrentGovernanceRoleAppointments

      @GetMapping(path="/governance-roles/by-domain/{domainIdentifier}/current-appointments") public org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceRoleAppointeesResponse getCurrentGovernanceRoleAppointments(@PathVariable String serverName, @PathVariable String userId, @PathVariable int domainIdentifier, @RequestParam int startFrom, @RequestParam int pageSize)
      Return all the governance roles and their incumbents (if any).
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user
      domainIdentifier - domain of interest - 0 is all domains
      startFrom - where to start from in the list of definitions
      pageSize - max number of results to return in one call
      Returns:
      list of governance role objects or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • appointGovernanceRole

      @PostMapping(path="/governance-roles/{governanceRoleGUID}/appoint/{profileGUID}") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse appointGovernanceRole(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, @PathVariable String profileGUID, @RequestBody org.odpi.openmetadata.commonservices.ffdc.rest.AppointmentRequestBody requestBody)
      Link a person to a governance role. Only one person may be appointed at any one time.
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user.
      governanceRoleGUID - unique identifier (guid) of the governance role.
      profileGUID - unique identifier of the actor profile
      requestBody - unique identifier for the profile and start date.
      Returns:
      unique identifier (guid) of the appointment relationship or UnrecognizedGUIDException the unique identifier of the governance role or profile is either null or invalid or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
    • relieveGovernanceRole

      @PostMapping(path="/governance-roles/{governanceRoleGUID}/relieve/{appointmentGUID}/{profileGUID}") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse relieveGovernanceRole(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, @PathVariable String appointmentGUID, @PathVariable String profileGUID, @RequestBody org.odpi.openmetadata.commonservices.ffdc.rest.AppointmentRequestBody requestBody)
      Unlink a person from a governance role appointment.
      Parameters:
      serverName - name of server instance to call
      userId - the name of the calling user
      governanceRoleGUID - unique identifier (guid) of the governance role
      appointmentGUID - unique identifier (guid) of the appointment relationship
      requestBody - unique identifier for the profile and end date.
      Returns:
      void response or UnrecognizedGUIDException the unique identifier of the governance role or profile is either null or invalid or InvalidParameterException the profile is not linked to this governance role or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.