Class IdentityService


  • public class IdentityService
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      IdentityService()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancelMerge​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeRequest request, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author, String clientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeResponse response)
      Detach a merged Identity from its master Identity
      Identity create​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest request, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author, String clientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse response)
      Creates a new Identity according to the given IdentityChangeRequest
      void delete​(String customerId)
      Delete the identity and all his children, including potential merged identities, EXCEPT identity history.
      The purge consist of deleting, for the identity and all of its potential merged identities : the Identity object the IdentityAttribute objetcs the IdentityAttributeHistory objects the SuspiciousIdentity objects the ExcludedIdentities objects The identity's history is kept.
      void deleteRequest​(String customerId, String clientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse response)
      request a deletion of identity .
      Batch<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto> getIdentitiesBatchForPotentialDuplicate​(DuplicateRule rule, int batchSize)
      Gets a list of qualified identities on which to search potential duplicates.
      Returned identities must have all attributes checked by the provided rule, and must also not be already merged nor be tagged as suspicious.
      The list is sorted by quality (higher quality identities first).
      fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto getQualifiedIdentity​(String customerId)  
      Identity importIdentity​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest identityChangeRequest, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author, String clientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse response)
      Imports an Identity according to the given IdentityChangeRequest
      static IdentityService instance()  
      Identity merge​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeRequest request, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author, String clientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeResponse response)
      Merges two existing Identity specified in the given IdentityMergeRequest and following the given rules:
      Both Identity must exist and not be merged or deleted in te database.
      void search​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchRequest request, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchResponse response, String clientCode)
      Perform an identity research over a list of attributes (key and values) specified in the IdentitySearchRequest
      fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto search​(String customerId)
      Performs a search of an IdentityDto, providing its customer id
      void search​(String customerId, String connectionId, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchResponse response, String clientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author)
      Perform an identity research by customer or connection ID.
      List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto> search​(List<String> customerIds)
      Performs a search of a list of IdentityDto, providing a list of customer ids
      fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse uncertifyIdentity​(String strCustomerId, String strClientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author)
      Dé-certification d'une identité.
      Identity update​(String customerId, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest request, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author, String clientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse response)
      Updates an existing Identity according to the given IdentityChangeRequest and following the given rules:
      The Identity must exist in te database.
    • Constructor Detail

      • IdentityService

        public IdentityService()
    • Method Detail

      • create

        public Identity create​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest request,
                               fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author,
                               String clientCode,
                               fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse response)
                        throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Creates a new Identity according to the given IdentityChangeRequest
        Parameters:
        request - the IdentityChangeRequest holding the parameters of the identity change request
        author - the author of the request
        clientCode - code of the ClientApplication requesting the change
        response - the IdentityChangeResponse holding the status of the execution of the request
        Returns:
        the created Identity
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException - in case of error
      • update

        public Identity update​(String customerId,
                               fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest request,
                               fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author,
                               String clientCode,
                               fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse response)
                        throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Updates an existing Identity according to the given IdentityChangeRequest and following the given rules:
        • The Identity must exist in te database. If not, NOT_FOUND status is returned in the execution response
        • The Identity must not be merged or deleted. In case of merged/deleted identity, the update is not performed and the customer ID of the primary identity is returned in the execution response with a CONFLICT status
        • If the Identity can be updated, its IdentityAttribute list is updated following the given rule:
          • If the IdentityAttribute exists, it is updated if the value is different, and if the process level given in the request is higher than the existing one. If the value cannot be updated, the NOT_UPDATED status, associated with the attribute key, is returned in the execution response.
          • If the IdentityAttribute does not exist, it is created. The CREATED status, associated with the attribute key, is returned in the execution response.
          • CUID and GUID attributes cannot be modified.
        Parameters:
        customerId - the id of the updated Identity
        request - the IdentityChangeRequest holding the parameters of the identity change request
        author - the author of the request
        clientCode - code of the ClientApplication requesting the change
        response - the IdentityChangeResponse holding the status of the execution of the request
        Returns:
        the updated Identity
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException - in case of error
      • merge

        public Identity merge​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeRequest request,
                              fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author,
                              String clientCode,
                              fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeResponse response)
        Merges two existing Identity specified in the given IdentityMergeRequest and following the given rules:
        • Both Identity must exist and not be merged or deleted in te database. If not, FAILURE status is returned in the execution response
        • The IdentityAttribute(s) of the secondary Identity are processed, according to the list of keys specified in the IdentityMergeRequest.
        Parameters:
        request - the IdentityMergeRequest holding the parameters of the request
        author - the author of the request
        clientCode - code of the ClientApplication requesting the change
        response - the IdentityMergeResponse holding the status of the execution of the request
        Returns:
        the merged Identity
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException - in case of error
      • cancelMerge

        public void cancelMerge​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeRequest request,
                                fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author,
                                String clientCode,
                                fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeResponse response)
        Detach a merged Identity from its master Identity
        Parameters:
        request - the unmerge request
        author - the author of the request
        clientCode - the client code of the calling application
        response - the status of the execution
      • importIdentity

        public Identity importIdentity​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest identityChangeRequest,
                                       fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author,
                                       String clientCode,
                                       fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse response)
                                throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Imports an Identity according to the given IdentityChangeRequest
        Parameters:
        identityChangeRequest - the IdentityChangeRequest holding the parameters of the identity change request
        author - the author of the request
        clientCode - code of the ClientApplication requesting the change
        response - the IdentityChangeResponse holding the status of the execution of the request
        Returns:
        the imported Identity
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException - in case of error
      • getQualifiedIdentity

        public fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto getQualifiedIdentity​(String customerId)
                                                                                                    throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • search

        public void search​(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchRequest request,
                           fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author,
                           fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchResponse response,
                           String clientCode)
                    throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Perform an identity research over a list of attributes (key and values) specified in the IdentitySearchRequest
        Parameters:
        request - the IdentitySearchRequest holding the parameters of the research
        author - the author of the request
        response - the IdentitySearchResponse holding the status of the execution status and the results of the request
        clientCode - code of the ClientApplication requesting the change
        Throws:
        ServiceContractNotFoundException - in case of ServiceContract management error
        IdentityAttributeNotFoundException - in case of AttributeKey management error
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • search

        public void search​(String customerId,
                           String connectionId,
                           fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchResponse response,
                           String clientCode,
                           fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author)
                    throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Perform an identity research by customer or connection ID.
        Parameters:
        customerId -
        connectionId -
        response -
        clientCode -
        author - the author of the request
        Throws:
        IdentityAttributeNotFoundException
        ServiceContractNotFoundException
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • search

        public List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto> search​(List<String> customerIds)
        Performs a search of a list of IdentityDto, providing a list of customer ids
        Parameters:
        customerIds - the customer ids to search for
        Returns:
        a list of IdentityDto
      • search

        public fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto search​(String customerId)
        Performs a search of an IdentityDto, providing its customer id
        Parameters:
        customerId - the customer id to search for
        Returns:
        an IdentityDto
      • getIdentitiesBatchForPotentialDuplicate

        public Batch<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto> getIdentitiesBatchForPotentialDuplicate​(DuplicateRule rule,
                                                                                                                                     int batchSize)
        Gets a list of qualified identities on which to search potential duplicates.
        Returned identities must have all attributes checked by the provided rule, and must also not be already merged nor be tagged as suspicious.
        The list is sorted by quality (higher quality identities first).
        Parameters:
        rule - the rule used to get matching identities
        Returns:
        the list of identities
      • deleteRequest

        public void deleteRequest​(String customerId,
                                  String clientCode,
                                  fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.RequestAuthor author,
                                  fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse response)
                           throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        request a deletion of identity .
        Parameters:
        customerId - the customer ID
        clientCode - the client code
        author - the author of the request
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • delete

        public void delete​(String customerId)
        Delete the identity and all his children, including potential merged identities, EXCEPT identity history.
        The purge consist of deleting, for the identity and all of its potential merged identities : The identity's history is kept.
        Parameters:
        customerId - the customerId of the identity to delete