Class UserIdentityHandler<B>

Type Parameters:
B - class that represents the user identity

public class UserIdentityHandler<B> extends ReferenceableHandler<B>
UserIdentityHandler provides the exchange of metadata about users between the repository and the OMAS.
  • Constructor Details

    • UserIdentityHandler

      public UserIdentityHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog)
      Construct the handler with information needed to work with B objects.
      Parameters:
      converter - specific converter for this bean class
      beanClass - name of bean class that is represented by the generic class B
      serviceName - name of this service
      serverName - name of the local server
      invalidParameterHandler - handler for managing parameter errors
      repositoryHandler - manages calls to the repository services
      repositoryHelper - provides utilities for manipulating the repository services objects
      localServerUserId - userId for this server
      securityVerifier - open metadata security services verifier
      supportedZones - list of zones that the access service is allowed to serve B instances from
      defaultZones - list of zones that the access service should set in all new B instances
      publishZones - list of zones that the access service sets up in published B instances
      auditLog - destination for audit log events
  • Method Details

    • createUserIdentity

      public String createUserIdentity(String userId, String externalSourceGUID, String externalSourceName, String profileGUID, String profileGUIDParameterName, String qualifiedName, String elementUserId, String distinguishedName, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create the entity that represents a user identity. If the profileGUID is supplied, the profile becomes the anchor of the User Identity, and they are linked together.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      profileGUID - the unique identifier of the profile GUID that is the anchor of
      profileGUIDParameterName - parameter name supplying profileGUID
      qualifiedName - unique name for the user identity - used in other configuration
      elementUserId - user account identifier
      distinguishedName - LDAP distinguished name
      additionalProperties - additional properties for a user identity
      suppliedTypeName - type name from the caller (enables creation of subtypes)
      extendedProperties - properties for a governance user identity subtype
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      unique identifier of the new user identity object
      Throws:
      InvalidParameterException - qualifiedName or userId is null
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • updateUserIdentity

      public void updateUserIdentity(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String userIdentityGUIDParameterName, String qualifiedName, String elementUserId, String distinguishedName, Map<String,String> additionalProperties, String typeName, Map<String,Object> extendedProperties, boolean isMergeUpdate, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the entity that represents a user identity.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      userIdentityGUID - unique identifier of the user identity to update
      userIdentityGUIDParameterName - parameter passing the userIdentityGUID
      qualifiedName - unique name for the user identity - used in other configuration
      elementUserId - user account identifier
      distinguishedName - LDAP distinguished name
      additionalProperties - additional properties for a governance user identity
      typeName - type of user identity
      extendedProperties - properties for a governance user identity subtype
      isMergeUpdate - should the supplied properties be merged with existing properties (true) only replacing the properties with matching names, or should the entire properties of the instance be replaced?
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Throws:
      InvalidParameterException - qualifiedName or userId is null
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • deleteUserIdentity

      public void deleteUserIdentity(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String userIdentityGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a user identity.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      userIdentityGUID - unique identifier of the metadata element to remove
      userIdentityGUIDParameterName - parameter supplying the user identityGUID
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • addIdentityToProfile

      public void addIdentityToProfile(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String userIdentityGUIDParameterName, String profileGUID, String profileGUIDParameterName, String roleTypeName, String roleGUID, String description, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Link a user identity to a profile.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      userIdentityGUID - unique identifier of the user identity
      userIdentityGUIDParameterName - parameter name supplying userIdentityGUID
      profileGUID - unique identifier of the profile
      profileGUIDParameterName - parameter name supplying profileGUID
      roleTypeName - what is the type of the role that this identity is used for
      roleGUID - what is the guid of the role that this identity is used for
      description - describe how this identity is used
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Throws:
      InvalidParameterException - entity not known, null userId or guid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • updateIdentityProfile

      public void updateIdentityProfile(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String userIdentityGUIDParameterName, String profileGUID, String profileGUIDParameterName, String roleTypeName, String roleGUID, String description, Date effectiveFrom, Date effectiveTo, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the properties for the link between a user identity to a profile.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      userIdentityGUID - unique identifier of the user identity
      userIdentityGUIDParameterName - parameter name supplying userIdentityGUID
      profileGUID - unique identifier of the profile
      profileGUIDParameterName - parameter name supplying profileGUID
      roleTypeName - what is the type of the role that this identity is used for
      roleGUID - what is the guid of the role that this identity is used for
      description - describe how this identity is used
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      isMergeUpdate - should the supplied properties be overlaid on the existing properties (true) or replace them (false
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Throws:
      InvalidParameterException - entity not known, null userId or guid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • removeIdentifyFromProfile

      public void removeIdentifyFromProfile(String userId, String externalSourceGUID, String externalSourceName, String userIdentityGUID, String userIdentityGUIDParameterName, String profileGUID, String profileGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Unlink a user identity from a profile.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      userIdentityGUID - unique identifier of the user identity
      userIdentityGUIDParameterName - parameter name supplying userIdentityGUID
      profileGUID - unique identifier of the profile
      profileGUIDParameterName - parameter name supplying profileGUID
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Throws:
      InvalidParameterException - entity not known, null userId or guid
      PropertyServerException - problem accessing property server
      UserNotAuthorizedException - security access problem
    • getUserIdentitiesByName

      public List<B> getUserIdentitiesByName(String userId, String name, String nameParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) 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.
      Parameters:
      userId - calling user
      name - name to search for
      nameParameterName - parameter supplying name
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      list of matching metadata elements
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getUserIdentityByGUID

      public B getUserIdentityByGUID(String userId, String guid, String guidParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the user identity metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      guid - unique identifier of the requested metadata element
      guidParameterName - parameter name of guid
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      matching metadata element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)