Class PersonalProfileResource
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.communityprofile.server.spring.PersonalProfileResource
-
@RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/community-profile/users/{userId}") public class PersonalProfileResource extends ObjectThe GovernanceProgramOMASGovernanceLeadershipResource provides a Spring based server-side REST API that supports the GovernanceLeadershipInterface. It delegates each request to the GovernanceProgramRESTServices. 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 PersonalProfileResource()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GUIDResponsecreatePersonalProfile(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.VoidResponsedeletePersonalProfile(String serverName, String userId, String profileGUID, PersonalProfileValidatorRequestBody requestBody)Delete the personal profile.PersonalProfileResponsegetPersonalProfileByGUID(String serverName, String userId, String profileGUID)Retrieve a personal profile by guid.PersonalProfileResponsegetPersonalProfileByQualifiedName(String serverName, String userId, NameRequestBody requestBody)Return a list of candidate personal profiles for an individual.PersonalProfileResponsegetPersonalProfileForUser(String serverName, String userId, String profileUserId)Return the profile for this user.PersonalProfileListResponsegetPersonalProfilesByName(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody)Return a list of candidate personal profiles for an individual.VoidResponseupdatePersonalProfile(String serverName, String userId, String profileGUID, PersonalProfileRequestBody requestBody)Update properties for the personal properties.
-
-
-
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 calluserId- 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 calluserId- 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 calluserId- 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 requestuserId- 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 calluserId- 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 calluserId- the name of the calling userrequestBody- 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 calluserId- the name of the calling userstartFrom- scan pointerpageSize- maximum number of resultsrequestBody- 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.
-
-