Class PersonalProfileResource


  • @RestController
    @RequestMapping("/servers/{serverName}/open-metadata/access-services/community-profile/users/{userId}")
    public class PersonalProfileResource
    extends Object
    The PersonalProfileResource provides a Spring based server-side REST API that supports the PersonalProfileInterface. It delegates each request to the PersonalProfileRESTServices. This provides the server-side implementation of the Community Profile Open Metadata Assess Service (OMAS) which is used to manage information about people, roles and organizations.
    • Constructor Detail

      • PersonalProfileResource

        public PersonalProfileResource()
        Default constructor
    • Method Detail

      • createPersonalProfile

        @PostMapping(path="/personal-profiles")
        public GUIDResponse createPersonalProfile​(@PathVariable
                                                  String serverName,
                                                  @PathVariable
                                                  String userId,
                                                  @RequestBody
                                                  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

        @PostMapping(path="/personal-profiles/{profileGUID}")
        public VoidResponse updatePersonalProfile​(@PathVariable
                                                  String serverName,
                                                  @PathVariable
                                                  String userId,
                                                  @PathVariable
                                                  String profileGUID,
                                                  @RequestBody
                                                  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 UnrecognizedGUIDException the unique identifier of the personal profile is either null or invalid or InvalidParameterException the full name is null or the employeeNumber 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

        @PostMapping(path="/personal-profiles/{profileGUID}/delete")
        public VoidResponse deletePersonalProfile​(@PathVariable
                                                  String serverName,
                                                  @PathVariable
                                                  String userId,
                                                  @PathVariable
                                                  String profileGUID,
                                                  @RequestBody
                                                  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

        @GetMapping(path="/personal-profiles/user/{profileUserId}")
        public PersonalProfileResponse getPersonalProfileForUser​(@PathVariable
                                                                 String serverName,
                                                                 @PathVariable
                                                                 String userId,
                                                                 @PathVariable
                                                                 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

        @GetMapping(path="/personal-profiles/{profileGUID}")
        public PersonalProfileResponse getPersonalProfileByGUID​(@PathVariable
                                                                String serverName,
                                                                @PathVariable
                                                                String userId,
                                                                @PathVariable
                                                                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

        @PostMapping(path="/personal-profiles/by-qualified-name")
        public PersonalProfileResponse getPersonalProfileByQualifiedName​(@PathVariable
                                                                         String serverName,
                                                                         @PathVariable
                                                                         String userId,
                                                                         @RequestBody
                                                                         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
        requestBody - name of individual
        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.
      • getPersonalProfilesByName

        @PostMapping(path="/personal-profiles/by-name")
        public PersonalProfileListResponse getPersonalProfilesByName​(@PathVariable
                                                                     String serverName,
                                                                     @PathVariable
                                                                     String userId,
                                                                     @RequestParam
                                                                     int startFrom,
                                                                     @RequestParam
                                                                     int pageSize,
                                                                     @RequestBody
                                                                     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 of individual
        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.