Class GovernanceRolesRESTServices


  • public class GovernanceRolesRESTServices
    extends Object
    The GovernanceRolesRESTServices provides the server-side implementation of the GovernanceRolesInterface from the Open Metadata Access Service (OMAS). This interface provides the ability to governance roles and link/unlink them to individuals.
    • Constructor Detail

      • GovernanceRolesRESTServices

        public GovernanceRolesRESTServices()
        Default constructor
    • Method Detail

      • createGovernanceRole

        public GUIDResponse createGovernanceRole​(String serverName,
                                                 String userId,
                                                 GovernanceRoleProperties requestBody)
        Create the governance role.
        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

        public VoidResponse updateGovernanceRole​(String serverName,
                                                 String userId,
                                                 String governanceRoleGUID,
                                                 boolean isMergeUpdate,
                                                 GovernanceRoleProperties requestBody)
        Update selected fields for the governance role.
        Parameters:
        serverName - name of server instance to call
        userId - the name of the calling user
        isMergeUpdate - are unspecified properties unchanged (true) or replaced with null?
        governanceRoleGUID - unique identifier (guid) of the governance role.
        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 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

        public VoidResponse linkRoleToResponsibility​(String serverName,
                                                     String userId,
                                                     String governanceRoleGUID,
                                                     String responsibilityGUID,
                                                     NullRequestBody 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 - null 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

        public VoidResponse unlinkRoleFromResponsibility​(String serverName,
                                                         String userId,
                                                         String governanceRoleGUID,
                                                         String responsibilityGUID,
                                                         NullRequestBody 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 - null 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

        public VoidResponse linkRoleToResource​(String serverName,
                                               String userId,
                                               String governanceRoleGUID,
                                               String resourceGUID,
                                               NullRequestBody 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 - null 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

        public VoidResponse unlinkRoleFromResource​(String serverName,
                                                   String userId,
                                                   String governanceRoleGUID,
                                                   String resourceGUID,
                                                   NullRequestBody 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 - null 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

        public VoidResponse deleteGovernanceRole​(String serverName,
                                                 String userId,
                                                 String governanceRoleGUID,
                                                 NullRequestBody 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 - null request body
        Returns:
        void response or UnrecognizedGUIDException the unique identifier of the governance role is either null or invalid or InvalidParameterException the appointmentId or governance domain is either null or invalid or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
      • getGovernanceRoleByGUID

        public GovernanceRoleResponse getGovernanceRoleByGUID​(String serverName,
                                                              String userId,
                                                              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 UnrecognizedGUIDException 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

        public 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.
        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 UnrecognizedGUIDException 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

        public GovernanceRoleListResponse getGovernanceRoleByRoleId​(String serverName,
                                                                    String userId,
                                                                    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 of 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 of the governance role.
        Returns:
        governance role object or InvalidParameterException the governanceRoleGUID or governance domain 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

        public GovernanceRoleListResponse getGovernanceRolesByDomainId​(String serverName,
                                                                       String userId,
                                                                       int domainIdentifier,
                                                                       int startFrom,
                                                                       int pageSize)
        Return all of the defined governance roles.
        Parameters:
        serverName - name of server instance to call
        userId - the name of the calling user.
        domainIdentifier - domain of interest - 0 means 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.
      • getGovernanceRolesByTitle

        public GovernanceRoleListResponse getGovernanceRolesByTitle​(String serverName,
                                                                    String userId,
                                                                    String title,
                                                                    int startFrom,
                                                                    int pageSize)
        Retrieve all of 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 PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
      • getCurrentGovernanceRoleAppointments

        public GovernanceRoleAppointeeListResponse getCurrentGovernanceRoleAppointments​(String serverName,
                                                                                        String userId,
                                                                                        int domainIdentifier,
                                                                                        int startFrom,
                                                                                        int pageSize)
        Return all of the governance roles and their incumbents (if any).
        Parameters:
        serverName - name of server instance to call
        userId - the name of the calling user.
        domainIdentifier - identifier of domain - 0 means all
        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

        public GUIDResponse appointGovernanceRole​(String serverName,
                                                  String userId,
                                                  String governanceRoleGUID,
                                                  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.
        requestBody - unique identifier for the profile
        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

        public VoidResponse relieveGovernanceRole​(String serverName,
                                                  String userId,
                                                  String governanceRoleGUID,
                                                  String appointmentGUID,
                                                  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.
        requestBody - unique identifier for the profile.
        appointmentGUID - unique identifier (guid) of the appointment relationship
        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.