Class PersonalProfileRESTServices


  • public class PersonalProfileRESTServices
    extends Object
    The PersonalProfileRESTServices provides the server-side implementation of the Community Profile Open Metadata Assess Service (OMAS) capability for managing personal profiles. This interface provides connections to assets and APIs for adding feedback on the asset.
    • Constructor Detail

      • PersonalProfileRESTServices

        public PersonalProfileRESTServices()
        Default constructor
    • Method Detail

      • createPersonalProfile

        public GUIDResponse createPersonalProfile​(String serverName,
                                                  String userId,
                                                  PersonalProfileRequestBody requestBody)
        Create a personal profile for an individual who is to be appointed to a governance role but does not have a profile in open metadata.
        Parameters:
        serverName - name of server instance to call
        userId - the name of the calling user.
        requestBody - properties about the individual.
        Returns:
        Unique identifier for the personal profile or InvalidParameterException the employee number or full name is null or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
      • updatePersonalProfile

        public VoidResponse updatePersonalProfile​(String serverName,
                                                  String userId,
                                                  String profileGUID,
                                                  PersonalProfileRequestBody requestBody)
        Update properties for the personal properties. Null values result in empty fields in the profile.
        Parameters:
        serverName - name of server instance to call
        userId - the name of the calling user.
        profileGUID - unique identifier for the profile.
        requestBody - properties about the individual.
        Returns:
        void response or NoProfileForUserException there is no profile for the user or InvalidParameterException the full name is null or the qualifiedName does not match the profileGUID or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
      • deletePersonalProfile

        public VoidResponse deletePersonalProfile​(String serverName,
                                                  String userId,
                                                  String profileGUID,
                                                  PersonalProfileValidatorRequestBody requestBody)
        Delete the personal profile.
        Parameters:
        serverName - name of server instance to call
        userId - the name of the calling user.
        profileGUID - unique identifier for the profile.
        requestBody - personnel/serial/unique employee number of the individual.
        Returns:
        void response or UnrecognizedGUIDException the unique identifier of the personal profile is either null or invalid or InvalidParameterException the employee number or full name is null or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
      • getPersonalProfileForUser

        public PersonalProfileResponse getPersonalProfileForUser​(String serverName,
                                                                 String userId,
                                                                 String profileUserId)
        Return the profile for this user.
        Parameters:
        serverName - name of the server instances for this request
        userId - userId of the user making the request.
        profileUserId - userId for person that profile belongs to
        Returns:
        profile response object or null or InvalidParameterException the userId is null or invalid or PropertyServerException there is a problem retrieving information from the property server(s) or UserNotAuthorizedException the requesting user is not authorized to issue this request.
      • getPersonalProfileByGUID

        public PersonalProfileResponse getPersonalProfileByGUID​(String serverName,
                                                                String userId,
                                                                String profileGUID)
        Retrieve a personal profile by guid.
        Parameters:
        serverName - name of server instance to call
        userId - the name of the calling user.
        profileGUID - unique identifier for the profile.
        Returns:
        personal profile object or UnrecognizedGUIDException the unique identifier of the personal 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.
      • getPersonalProfileByQualifiedName

        public PersonalProfileResponse getPersonalProfileByQualifiedName​(String serverName,
                                                                         String userId,
                                                                         NameRequestBody requestBody)
        Retrieve a personal profile by personnel/serial/unique employee number of the individual.
        Parameters:
        serverName - name of server instance to call
        userId - the name of the calling user.
        requestBody - name information
        Returns:
        personal profile object or InvalidParameterException the employee number or full name is null or EmployeeNumberNotUniqueException more than one personal profile was found or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.
      • getPersonalProfilesByName

        public PersonalProfileListResponse getPersonalProfilesByName​(String serverName,
                                                                     String userId,
                                                                     int startFrom,
                                                                     int pageSize,
                                                                     NameRequestBody requestBody)
        Return a list of candidate personal profiles for an individual. It matches on full name and known name. The name may include wild card parameters.
        Parameters:
        serverName - name of server instance to call
        userId - the name of the calling user.
        startFrom - scan pointer
        pageSize - maximum number of results
        requestBody - name information
        Returns:
        list of personal profile objects or InvalidParameterException the name is null or PropertyServerException the server is not available or UserNotAuthorizedException the calling user is not authorized to issue the call.