Class UserIdentityManagement
java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.client.CommunityProfileBaseClient
org.odpi.openmetadata.accessservices.communityprofile.client.UserIdentityManagement
- All Implemented Interfaces:
RelatedElementsManagementInterface
,UserIdentityManagementInterface
public class UserIdentityManagement
extends CommunityProfileBaseClient
implements UserIdentityManagementInterface
UserIdentityManagement is the client for explicitly managing the user identity entities and associating them with
profiles. It is typically used when the relationship between user identities and profiles are many to one.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.accessservices.communityprofile.client.CommunityProfileBaseClient
baseURLTemplatePrefix, openMetadataStoreClient, propertyHelper
-
Constructor Summary
ConstructorDescriptionUserIdentityManagement
(String serverName, String serverPlatformURLRoot, int maxPageSize) Create a new client with no authentication embedded in the HTTP request.UserIdentityManagement
(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) Create a new client that passes userId and password in each HTTP request.UserIdentityManagement
(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, int maxPageSize) Create a new client that passes userId and password in each HTTP request.UserIdentityManagement
(String serverName, String serverPlatformURLRoot, CommunityProfileRESTClient restClient, int maxPageSize) Create a new client that passes userId and password in each HTTP request.UserIdentityManagement
(String serverName, String serverPlatformURLRoot, AuditLog auditLog, int maxPageSize) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIdentityToProfile
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID, ProfileIdentityProperties properties) Link a user identity to a profile.createUserIdentity
(String userId, String externalSourceGUID, String externalSourceName, UserIdentityProperties newIdentity) Create a UserIdentity.createUserIdentityForProfile
(String userId, String externalSourceGUID, String externalSourceName, String profileGUID, UserIdentityProperties newIdentity) Create a UserIdentity that is for the sole use of a specific actor profile.void
deleteUserIdentity
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID) Remove a user identity object.findUserIdentities
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of user identity metadata elements that contain the search string.getUserIdentitiesByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of user identity metadata elements with a matching qualified name.getUserIdentityByGUID
(String userId, String userIdentityGUID) Retrieve the userIdentity metadata element with the supplied unique identifier.void
removeIdentityFromProfile
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID) Unlink a user identity from a profile.void
updateProfileIdentity
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID, boolean isMergeUpdate, ProfileIdentityProperties properties) Update the properties of the relationship between a user identity and profile.void
updateUserIdentity
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, boolean isMergeUpdate, UserIdentityProperties properties) Update a UserIdentity.Methods inherited from class org.odpi.openmetadata.accessservices.communityprofile.client.CommunityProfileBaseClient
clearAssignmentScope, clearMoreInformation, clearResource, clearStakeholder, getAssignedActors, getAssignedScopes, getDescriptiveElements, getMoreInformation, getResourceList, getStakeholderCommissionedElements, getStakeholders, getSupportedByResource, removeReferenceable, setupAssignmentScope, setupMoreInformation, setupResource, setupStakeholder, updateRelationship
-
Constructor Details
-
UserIdentityManagement
public UserIdentityManagement(String serverName, String serverPlatformURLRoot, int maxPageSize) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesmaxPageSize
- maximum value allowed for page size- Throws:
InvalidParameterException
- bad input parameters
-
UserIdentityManagement
public UserIdentityManagement(String serverName, String serverPlatformURLRoot, AuditLog auditLog, int maxPageSize) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesauditLog
- logging destinationmaxPageSize
- maximum value allowed for page size- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
UserIdentityManagement
public UserIdentityManagement(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsmaxPageSize
- maximum value allowed for page size- Throws:
InvalidParameterException
- bad input parameters
-
UserIdentityManagement
public UserIdentityManagement(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, int maxPageSize) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsauditLog
- logging destinationmaxPageSize
- maximum value allowed for page size- Throws:
InvalidParameterException
- bad input parameters
-
UserIdentityManagement
public UserIdentityManagement(String serverName, String serverPlatformURLRoot, CommunityProfileRESTClient restClient, int maxPageSize) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- pre-initialized REST clientmaxPageSize
- pre-initialized parameter limit- Throws:
InvalidParameterException
- there is a problem with the information about the remote OMAS
-
-
Method Details
-
createUserIdentity
public String createUserIdentity(String userId, String externalSourceGUID, String externalSourceName, UserIdentityProperties newIdentity) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create a UserIdentity. This is not connected to a profile.- Specified by:
createUserIdentity
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- the name of the calling user.externalSourceGUID
- unique identifier of software server capability representing the callerexternalSourceName
- unique name of software server capability representing the callernewIdentity
- properties for the new userIdentity.- Returns:
- unique identifier of the UserIdentity
- 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.
-
createUserIdentityForProfile
public String createUserIdentityForProfile(String userId, String externalSourceGUID, String externalSourceName, String profileGUID, UserIdentityProperties newIdentity) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create a UserIdentity that is for the sole use of a specific actor profile. When the profile is deleted, the user identity is deleted.- Specified by:
createUserIdentityForProfile
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- the name of the calling user.externalSourceGUID
- unique identifier of software server capability representing the callerexternalSourceName
- unique name of software server capability representing the callerprofileGUID
- unique identifier of the profilenewIdentity
- properties for the new userIdentity- Returns:
- unique identifier of the UserIdentity
- 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.
-
updateUserIdentity
public void updateUserIdentity(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, boolean isMergeUpdate, UserIdentityProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update a UserIdentity.- Specified by:
updateUserIdentity
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- the name of the calling userexternalSourceGUID
- unique identifier of software server capability representing the callerexternalSourceName
- unique name of software server capability representing the calleruserIdentityGUID
- unique identifier of the UserIdentityisMergeUpdate
- should the supplied properties be overlaid on the existing properties (true) or replace them (falseproperties
- updated properties for the new userIdentity- 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.
-
deleteUserIdentity
public void deleteUserIdentity(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Remove a user identity object.- Specified by:
deleteUserIdentity
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- the name of the calling userexternalSourceGUID
- unique identifier of software server capability representing the callerexternalSourceName
- unique name of software server capability representing the calleruserIdentityGUID
- unique identifier of the UserIdentity- 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.
-
addIdentityToProfile
public void addIdentityToProfile(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID, ProfileIdentityProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Link a user identity to a profile.- Specified by:
addIdentityToProfile
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- the name of the calling user.externalSourceGUID
- unique identifier of software server capability representing the callerexternalSourceName
- unique name of software server capability representing the callerprofileGUID
- the profile to add the identity to.userIdentityGUID
- additional userId for the profile.properties
- the properties that describe how the owner of the profile uses the user identity- 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.
-
updateProfileIdentity
public void updateProfileIdentity(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID, boolean isMergeUpdate, ProfileIdentityProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the properties of the relationship between a user identity and profile.- Specified by:
updateProfileIdentity
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- the name of the calling userexternalSourceGUID
- unique identifier of software server capability representing the callerexternalSourceName
- unique name of software server capability representing the calleruserIdentityGUID
- additional userId for the profileprofileGUID
- the profile to add the identity toisMergeUpdate
- should the supplied properties be overlaid on the existing properties (true) or replace them (falseproperties
- the properties that describe how the owner of the profile uses the user identity- 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.
-
removeIdentityFromProfile
public void removeIdentityFromProfile(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Unlink a user identity from a profile.- Specified by:
removeIdentityFromProfile
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- the name of the calling user.externalSourceGUID
- unique identifier of software server capability representing the callerexternalSourceName
- unique name of software server capability representing the calleruserIdentityGUID
- unique identifier of the UserIdentityprofileGUID
- profile to remove it from.- 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.
-
findUserIdentities
public List<UserIdentityElement> findUserIdentities(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of user identity metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findUserIdentities
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getUserIdentitiesByName
public List<UserIdentityElement> getUserIdentitiesByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of user identity metadata elements with a matching qualified name. There are no wildcards supported on this request.- Specified by:
getUserIdentitiesByName
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getUserIdentityByGUID
public UserIdentityElement getUserIdentityByGUID(String userId, String userIdentityGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the userIdentity metadata element with the supplied unique identifier.- Specified by:
getUserIdentityByGUID
in interfaceUserIdentityManagementInterface
- Parameters:
userId
- calling useruserIdentityGUID
- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-