public class MyProfileManagement extends Object implements MyPersonalProfileInterface
| Constructor and Description |
|---|
MyProfileManagement(String serverName,
String serverPlatformURLRoot)
Create a new client with no authentication embedded in the HTTP request.
|
MyProfileManagement(String serverName,
String serverPlatformURLRoot,
AuditLog auditLog)
Create a new client with no authentication embedded in the HTTP request.
|
MyProfileManagement(String serverName,
String serverPlatformURLRoot,
CommunityProfileRESTClient restClient,
int maxPageSize)
Create a new client that passes userId and password in each HTTP request.
|
MyProfileManagement(String serverName,
String serverPlatformURLRoot,
String userId,
String password)
Create a new client that passes userId and password in each HTTP request.
|
MyProfileManagement(String serverName,
String serverPlatformURLRoot,
String userId,
String password,
AuditLog auditLog)
Create a new client that passes userId and password in each HTTP request.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addMyContactMethod(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 |
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.
|
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<ContactMethodElement> |
getMyContactDetails(String UserId)
Return the list of contact methods for this user.
|
long |
getMyKarmaPoints(String userId)
Return the total karma points for this user.
|
PersonalProfileUniverse |
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,
Map<String,String> additionalProperties)
Create or update the profile for the requesting user.
|
public MyProfileManagement(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversInvalidParameterException - bad input parameterspublic MyProfileManagement(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversauditLog - logging destinationInvalidParameterException - there is a problem creating the client-side components to issue any
REST API calls.public MyProfileManagement(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - 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 requestsInvalidParameterException - bad input parameterspublic MyProfileManagement(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - 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 requestsauditLog - logging destinationInvalidParameterException - bad input parameterspublic MyProfileManagement(String serverName, String serverPlatformURLRoot, CommunityProfileRESTClient restClient, int maxPageSize) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversrestClient - pre-initialized REST clientmaxPageSize - pre-initialized parameter limitInvalidParameterException - there is a problem with the information about the remote OMASpublic PersonalProfileUniverse getMyProfile(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
getMyProfile in interface MyPersonalProfileInterfaceuserId - userId of the user making the request.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.public long getMyKarmaPoints(String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
getMyKarmaPoints in interface MyPersonalProfileInterfaceuserId - userId of the user making the request.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.public void setUpMyProfile(String userId, String qualifiedName, String fullName, String knownName, String jobTitle, String jobRoleDescription, Map<String,String> additionalProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
setUpMyProfile in interface MyPersonalProfileInterfaceuserId - calling userqualifiedName - 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.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<ContactMethodElement> getMyContactDetails(String UserId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
getMyContactDetails in interface MyPersonalProfileInterfaceUserId - userId of the user making the request.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.public String addMyContactMethod(String userId, ContactMethodType type, String service, String value) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addMyContactMethod 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.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 deleteMyContactMethod(String userId, String contactMethodGUID, ContactMethodType type) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
deleteMyContactMethod 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.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, 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.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, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.assetGUID - unique identifier of the asset.InvalidParameterException - one of the parameters is invalid.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, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.assetGUID - unique identifier of the asset.InvalidParameterException - one of the parameters is invalid.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–2021 LF AI & Data Foundation. All rights reserved.