Interface MyPersonalProfileInterface
public interface MyPersonalProfileInterface
MyPersonalProfileInterface covers the management of a user's personal profile.
-
Method Summary
Modifier and TypeMethodDescriptionaddMyContactMethod
(String userId, ContactMethodType type, String service, String value) Add a new contact method to the requesting user's profile.void
deleteMyContactMethod
(String userId, String contactMethodGUID, ContactMethodType type) Remove an obsolete contact method from the requesting user's profile.void
deleteMyProfile
(String userId, String qualifiedName) Delete the profile for the requesting user.getMyContactDetails
(String userId) Return the list of contact methods for this user.long
getMyKarmaPoints
(String userId) Return the total karma points for this user.getMyProfile
(String userId) Return the profile for this user.void
setUpMyProfile
(String userId, String qualifiedName, String fullName, String knownName, String jobTitle, String jobRoleDescription, Map<String, String> additionalProperties) Create or update the profile for the requesting user.
-
Method Details
-
getMyProfile
PersonalProfileUniverse getMyProfile(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the profile for this user.- Parameters:
userId
- userId of the user making the request.- Returns:
- profile object
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getMyKarmaPoints
long getMyKarmaPoints(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the total karma points for this user.- Parameters:
userId
- userId of the user making the request.- Returns:
- int count of karma points
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getMyContactDetails
List<ContactMethodElement> getMyContactDetails(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the list of contact methods for this user.- Parameters:
userId
- userId of the user making the request.- Returns:
- list of contact methods
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
setUpMyProfile
void setUpMyProfile(String userId, String qualifiedName, String fullName, String knownName, String jobTitle, String jobRoleDescription, Map<String, String> additionalProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionCreate or update the profile for the requesting user. This is only permitted if the profile is not locked to (managed by) an external system.- Parameters:
userId
- the name of the calling user.qualifiedName
- personnel/serial/unique employee number of the individual.fullName
- full name of the person.knownName
- known name or nickname of the individual.jobTitle
- job title of the individual.jobRoleDescription
- job description of the individual.additionalProperties
- additional properties about the individual.- Throws:
InvalidParameterException
- one of the parameters is invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
addMyContactMethod
String addMyContactMethod(String userId, ContactMethodType type, String service, String value) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Add a new contact method to the requesting user's profile.- Parameters:
userId
- the name of the calling user.type
- type of contact method.service
- service for the contact method.value
- account name for the service.- Returns:
- unique identifier (guid) for the new contact method.
- Throws:
InvalidParameterException
- the userId is null or invalid. Another property is invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
deleteMyContactMethod
void deleteMyContactMethod(String userId, String contactMethodGUID, ContactMethodType type) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Remove an obsolete contact method from the requesting user's profile.- Parameters:
userId
- the name of the calling user.contactMethodGUID
- unique identifier (guid) for the obsolete contact method.type
- type of contact method. This is used to confirm that the GUID is the right one.- Throws:
InvalidParameterException
- the userId is null or invalid. Another property is invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
deleteMyProfile
void deleteMyProfile(String userId, String qualifiedName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Delete the profile for the requesting user. This is only permitted if the profile is not locked to (managed by) an external system and if the person is not appointed to any roles.- Parameters:
userId
- the name of the calling user.qualifiedName
- personnel/serial/unique employee number of the individual.- Throws:
InvalidParameterException
- one of the parameters is invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-