Class UserIdentityHandler
java.lang.Object
org.odpi.openmetadata.frameworkservices.omf.client.handlers.UserIdentityHandler
- Direct Known Subclasses:
UserIdentityManagement
,UserIdentityManagement
,UserIdentityManagement
Data design manager describes how to maintain and query data classes, actor profiles and user identities.
They are organized into specialized collections called data dictionaries and data specs (supported with the
collection manager).
-
Constructor Summary
ConstructorsConstructorDescriptionUserIdentityHandler
(String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) Create a new client that passes userId and password in each HTTP request.UserIdentityHandler
(String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSecurityGroupMembership
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, SecurityGroupMembershipProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Add the SecurityGroupMembership classification to the user identity.createUserIdentity
(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, boolean isOwnAnchor, String anchorScopeGUID, UserIdentityProperties properties, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Create a new user identity.createUserIdentityFromTemplate
(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, boolean isOwnAnchor, String anchorScopeGUID, Date effectiveFrom, Date effectiveTo, String templateGUID, ElementProperties replacementProperties, Map<String, String> placeholderProperties, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Create a new metadata element to represent a user identity using an existing element as a template.void
deleteUserIdentity
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, boolean cascadedDelete, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Delete a user identity.void
detachProfileIdentity
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Detach an actor profile from a user identity.findUserIdentities
(String userId, String searchString, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Retrieve the list of user identities metadata elements that contain the search string.getUserIdentitiesByName
(String userId, String name, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Returns the list of user identities with a particular name.getUserIdentityByGUID
(String userId, String userIdentityGUID, Date asOfTime, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Return the properties of a specific user identity.void
linkIdentityToProfile
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID, ProfileIdentityProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Attach a profile to a user identity.void
removeAllSecurityGroupMembership
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Remove the SecurityGroupMembership classification from the user identity.void
updateSecurityGroupMembership
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, SecurityGroupMembershipProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Update the SecurityGroupMembership classification for the user identity.void
updateUserIdentity
(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, boolean replaceAllProperties, UserIdentityProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Update the properties of a user identity.
-
Constructor Details
-
UserIdentityHandler
public UserIdentityHandler(String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
localServerName
- name of this server (view server)serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesauditLog
- logging destinationaccessServiceURLMarker
- which access service to callserviceName
- local service namemaxPageSize
- maximum number of results supported by this server- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
UserIdentityHandler
public UserIdentityHandler(String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, String accessServiceURLMarker, String serviceName, 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:
localServerName
- name of this server (view server)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 number of results supported by this serveraccessServiceURLMarker
- which access service to callserviceName
- local service nameauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
createUserIdentity
public String createUserIdentity(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, boolean isOwnAnchor, String anchorScopeGUID, UserIdentityProperties properties, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create a new user identity.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementanchorGUID
- unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.isOwnAnchor
- boolean flag to day that the element should be classified as its own anchor once its element is created in the repository.anchorScopeGUID
- unique identifier of any anchor scope to use for searchingproperties
- properties for the new element.parentGUID
- unique identifier of optional parent entityparentRelationshipTypeName
- type of relationship to connect the new element to the parentparentRelationshipProperties
- properties to include in parent relationshipparentAtEnd1
- which end should the parent GUID go in the relationshipforLineage
- the retrieved elements are for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.effectiveTime
- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.- Returns:
- unique identifier of the newly created element
- 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.
-
createUserIdentityFromTemplate
public String createUserIdentityFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, boolean isOwnAnchor, String anchorScopeGUID, Date effectiveFrom, Date effectiveTo, String templateGUID, ElementProperties replacementProperties, Map<String, String> placeholderProperties, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate a new metadata element to represent a user identity using an existing element as a template. The template defines additional classifications and relationships that should be added to the new user identity.- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementanchorGUID
- unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.isOwnAnchor
- boolean flag to day that the element should be classified as its own anchor once its element is created in the repository.anchorScopeGUID
- unique identifier of any anchor scope to use for searchingeffectiveFrom
- the date when this element is active - null for active on creationeffectiveTo
- the date when this element becomes inactive - null for active until deletedtemplateGUID
- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)replacementProperties
- properties of the new metadata element. These override the template valuesplaceholderProperties
- property name-to-property value map to replace any placeholder values in the template element - and their anchored elements, which are also copied as part of this operation.parentGUID
- unique identifier of optional parent entityparentRelationshipTypeName
- type of relationship to connect the new element to the parentparentRelationshipProperties
- properties to include in parent relationshipparentAtEnd1
- which end should the parent GUID go in the relationshipforLineage
- the retrieved elements are for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.effectiveTime
- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.- Returns:
- unique identifier of the new 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)
-
updateUserIdentity
public void updateUserIdentity(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, boolean replaceAllProperties, UserIdentityProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the properties of a user identity.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementuserIdentityGUID
- unique identifier of the user identity (returned from create)replaceAllProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.properties
- properties for the element.forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- 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.
-
linkIdentityToProfile
public void linkIdentityToProfile(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID, ProfileIdentityProperties relationshipProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Attach a profile to a user identity.- Parameters:
userId
- userId of user making requestexternalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementuserIdentityGUID
- unique identifier of the parentprofileGUID
- unique identifier of the actor profilerelationshipProperties
- description of the relationship.forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- one of the parameters 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.
-
detachProfileIdentity
public void detachProfileIdentity(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String profileGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Detach an actor profile from a user identity.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementuserIdentityGUID
- unique identifier of the parent actor profileprofileGUID
- unique identifier of the nested actor profileforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- one of the parameters 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.
-
addSecurityGroupMembership
public void addSecurityGroupMembership(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, SecurityGroupMembershipProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Add the SecurityGroupMembership classification to the user identity.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementuserIdentityGUID
- unique identifier of the user identity.properties
- properties for the classificationforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- one of the parameters 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.
-
updateSecurityGroupMembership
public void updateSecurityGroupMembership(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, SecurityGroupMembershipProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the SecurityGroupMembership classification for the user identity.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementuserIdentityGUID
- unique identifier of the user identity.properties
- properties for the classificationforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- one of the parameters 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.
-
removeAllSecurityGroupMembership
public void removeAllSecurityGroupMembership(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Remove the SecurityGroupMembership classification from the user identity.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementuserIdentityGUID
- unique identifier of the user identity.forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- one of the parameters 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.
-
deleteUserIdentity
public void deleteUserIdentity(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, boolean cascadedDelete, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Delete a user identity.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementuserIdentityGUID
- unique identifier of the elementcascadedDelete
- can the user identity be deleted if it has actor profiles linked to it?forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- one of the parameters 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.
-
getUserIdentitiesByName
public List<UserIdentityElement> getUserIdentitiesByName(String userId, String name, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Returns the list of user identities with a particular name.- Parameters:
userId
- userId of user making requestname
- name of the element to return - match is full text match in qualifiedName or nametemplateFilter
- should templates be returned?limitResultsByStatus
- control the status of the elements to retrieve - default is everything but DeletedasOfTime
- repository time to usesequencingOrder
- order to retrieve resultssequencingProperty
- property to use for sequencing orderstartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Returns:
- a list of elements
- Throws:
InvalidParameterException
- one of the parameters 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.
-
getUserIdentityByGUID
public UserIdentityElement getUserIdentityByGUID(String userId, String userIdentityGUID, Date asOfTime, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the properties of a specific user identity.- Parameters:
userId
- userId of user making requestuserIdentityGUID
- unique identifier of the required elementasOfTime
- repository time to useforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Returns:
- retrieved properties
- Throws:
InvalidParameterException
- one of the parameters 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.
-
findUserIdentities
public List<UserIdentityElement> findUserIdentities(String userId, String searchString, TemplateFilter templateFilter, List<ElementStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingProperty, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of user identities metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
userId
- calling usersearchString
- string to find in the propertiestemplateFilter
- should templates be returned?limitResultsByStatus
- control the status of the elements to retrieve - default is everything but DeletedasOfTime
- repository time to usesequencingOrder
- order to retrieve resultssequencingProperty
- property to use for sequencing orderstartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- 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)
-