public class MyProfileManagement extends Object implements MyPersonalProfileInterface
| Constructor and Description |
|---|
MyProfileManagement(String serverName,
String omasServerURL)
Create a new client with no authentication embedded in the HTTP request.
|
MyProfileManagement(String serverName,
String omasServerURL,
String userId,
String password)
Create a new client that passes userId and password in each HTTP request.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addContactMethod(String userId,
ContactMethodType type,
String service,
String value)
Add a new contact method to the requesting user's profile.
|
void |
addToMyAssets(String userId,
String assetGUID)
Add an asset to the identified user's list of favorite assets.
|
void |
deleteContactMethod(String userId,
String contactMethodGUID,
ContactMethodType type)
Remove an obsolete contact method from the requesting user's profile.
|
void |
deleteMyProfile(String userId,
String qualifiedName)
Create or update the profile for the requesting user.
|
List<AssetCollectionMember> |
getMyAssets(String userId,
int startFrom,
int pageSize)
Return a list of assets that the specified user has added to their favorites list.
|
List<ContactMethod> |
getMyContactDetails(String UserId)
Return the list of contact methods for this user.
|
int |
getMyKarmaPoints(String userId)
Return the total karma points for this user.
|
PersonalProfile |
getMyProfile(String userId)
Return the profile for this user.
|
void |
removeFromMyAssets(String userId,
String assetGUID)
Remove an asset from identified user's list of favorite assets.
|
void |
setUpMyProfile(String userId,
String qualifiedName,
String fullName,
String knownName,
String jobTitle,
String jobRoleDescription,
List<ContactMethod> contactDetails,
Map<String,String> additionalProperties)
Create or update the profile for the requesting user.
|
void |
setUpMyProfile(String userId,
String qualifiedName,
String fullName,
String knownName,
String jobTitle,
String jobRoleDescription,
Map<String,Object> profileProperties,
Map<String,String> additionalProperties)
Create or update the profile for the requesting user.
|
public MyProfileManagement(String serverName, String omasServerURL)
serverName - name of the server to connect toomasServerURL - the network address of the server running the OMAS REST serverspublic MyProfileManagement(String serverName, String omasServerURL, String userId, String password)
serverName - name of the server to connect toomasServerURL - the network address of the server running the OMAS REST serversuserId - caller's userId embedded in all HTTP requestspassword - caller's userId embedded in all HTTP requestspublic PersonalProfile getMyProfile(String userId) throws InvalidParameterException, NoProfileForUserException, PropertyServerException, UserNotAuthorizedException
getMyProfile in interface MyPersonalProfileInterfaceuserId - userId of the user making the request.InvalidParameterException - the userId is null or invalid.NoProfileForUserException - the user does not have a profile.PropertyServerException - there is a problem retrieving information from the property server(s).UserNotAuthorizedException - the requesting user is not authorized to issue this request.public int getMyKarmaPoints(String userId) throws InvalidParameterException, NoProfileForUserException, PropertyServerException, UserNotAuthorizedException
getMyKarmaPoints in interface MyPersonalProfileInterfaceuserId - userId of the user making the request.InvalidParameterException - the userId is null or invalid.NoProfileForUserException - the user does not have a profile.PropertyServerException - there is a problem retrieving information from the property server(s).UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void setUpMyProfile(String userId, String qualifiedName, String fullName, String knownName, String jobTitle, String jobRoleDescription, Map<String,Object> profileProperties, Map<String,String> additionalProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
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.profileProperties - properties about the individual for a new type that is the subclass of Person.additionalProperties - additional properties about the individual.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.public void deleteMyProfile(String userId, String qualifiedName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
deleteMyProfile in interface MyPersonalProfileInterfaceuserId - the name of the calling user.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.public List<ContactMethod> getMyContactDetails(String UserId) throws InvalidParameterException, NoProfileForUserException, PropertyServerException, UserNotAuthorizedException
getMyContactDetails in interface MyPersonalProfileInterfaceUserId - userId of the user making the request.InvalidParameterException - the userId is null or invalid.NoProfileForUserException - the user does not have a profile.PropertyServerException - there is a problem retrieving information from the property server(s).UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void setUpMyProfile(String userId, String qualifiedName, String fullName, String knownName, String jobTitle, String jobRoleDescription, List<ContactMethod> contactDetails, Map<String,String> additionalProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
setUpMyProfile in interface MyPersonalProfileInterfaceuserId - 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.contactDetails - list of contact methods for the person.additionalProperties - additional properties about the individual.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.public String addContactMethod(String userId, ContactMethodType type, String service, String value) throws InvalidParameterException, NoProfileForUserException, PropertyServerException, UserNotAuthorizedException
addContactMethod in interface MyPersonalProfileInterfaceuserId - the name of the calling user.type - type of contact method.service - service for the contact method.value - account name for the service.InvalidParameterException - the userId is null or invalid. Another property is invalid.NoProfileForUserException - the user does not have a profile.PropertyServerException - there is a problem retrieving information from the property server(s).UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void deleteContactMethod(String userId, String contactMethodGUID, ContactMethodType type) throws InvalidParameterException, NoProfileForUserException, PropertyServerException, UserNotAuthorizedException
deleteContactMethod in interface MyPersonalProfileInterfaceuserId - 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.InvalidParameterException - the userId is null or invalid. Another property is invalid.NoProfileForUserException - the user does not have a profile.PropertyServerException - there is a problem retrieving information from the property server(s).UserNotAuthorizedException - the requesting user is not authorized to issue this request.public List<AssetCollectionMember> getMyAssets(String userId, int startFrom, int pageSize) throws InvalidParameterException, NoProfileForUserException, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.startFrom - index of the list to start from (0 for start)pageSize - maximum number of elements to return.InvalidParameterException - one of the parameters is invalid.NoProfileForUserException - the user does not have a profile so can not have any asset collections.PropertyServerException - there is a problem retrieving information from the property server(s).UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void addToMyAssets(String userId, String assetGUID) throws InvalidParameterException, NoProfileForUserException, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.assetGUID - unique identifier of the asset.InvalidParameterException - one of the parameters is invalid.NoProfileForUserException - the user does not have a profile so can not have any asset collections.PropertyServerException - there is a problem updating information in the property server(s).UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void removeFromMyAssets(String userId, String assetGUID) throws InvalidParameterException, NoProfileForUserException, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.assetGUID - unique identifier of the asset.InvalidParameterException - one of the parameters is invalid.NoProfileForUserException - the user does not have a profile so can not have any asset collections.PropertyServerException - there is a problem updating information in the property server(s).UserNotAuthorizedException - the requesting user is not authorized to issue this request.Copyright © 2018–2019 ODPi. All rights reserved.