Class IdentityService


  • public class IdentityService
    extends Object
    IdentityService
    • Constructor Detail

      • IdentityService

        public IdentityService()
        Simple Constructor
      • IdentityService

        public IdentityService​(IIdentityTransportProvider transportProvider)
        Constructor with IIdentityTransportProvider in parameters
        Parameters:
        transportProvider - IIdentityTransportProvider
    • Method Detail

      • setTransportProvider

        public void setTransportProvider​(IIdentityTransportProvider transportProvider)
        setter of transportProvider parameter
        Parameters:
        transportProvider - IIdentityTransportProvider
      • getIdentityByConnectionId

        public fr.paris.lutece.plugins.identitystore.v1.web.rs.dto.IdentityDto getIdentityByConnectionId​(String strConnectionId,
                                                                                                         String strApplicationCode)
                                                                                                  throws fr.paris.lutece.portal.service.util.AppException,
                                                                                                         fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        get identity matching connectionId for provided application code
        Parameters:
        strConnectionId - connection Id
        strApplicationCode - application code of calling application
        Returns:
        identity if found
        Throws:
        fr.paris.lutece.portal.service.util.AppException - if inconsitent parmeters provided, or errors occurs...
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • getIdentityByCustomerId

        public fr.paris.lutece.plugins.identitystore.v1.web.rs.dto.IdentityDto getIdentityByCustomerId​(String strCustomerId,
                                                                                                       String strApplicationCode)
                                                                                                throws fr.paris.lutece.portal.service.util.AppException,
                                                                                                       fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        get identity matching customerId for provided application code
        Parameters:
        strCustomerId - customer Id
        strApplicationCode - application code of calling application
        Returns:
        identity if found
        Throws:
        fr.paris.lutece.portal.service.util.AppException - if inconsitent parmeters provided, or errors occurs...
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • getIdentity

        public fr.paris.lutece.plugins.identitystore.v1.web.rs.dto.IdentityDto getIdentity​(String strConnectionId,
                                                                                           String strCustomerId,
                                                                                           String strApplicationCode)
                                                                                    throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        get identity matching connectionId and customerId for provided application code
        Parameters:
        strConnectionId - connection Id (can be null if strCustomerId is provided)
        strCustomerId - customer Id (can be null if strConnectionId is provided)
        strApplicationCode - application code of calling application
        Returns:
        identity if found
        Throws:
        fr.paris.lutece.portal.service.util.AppException - if inconsitent parmeters provided, or errors occurs...
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • updateIdentity

        public fr.paris.lutece.plugins.identitystore.v1.web.rs.dto.IdentityDto updateIdentity​(fr.paris.lutece.plugins.identitystore.v1.web.rs.dto.IdentityChangeDto identityChange,
                                                                                              Map<String,​org.apache.commons.fileupload.FileItem> mapFiles)
                                                                                       throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        apply changes to an identity
        Parameters:
        identityChange - change to apply to identity
        mapFiles - fileitem map to upload
        Returns:
        the updated identity
        Throws:
        fr.paris.lutece.portal.service.util.AppException - if error occured while updating identity
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityNotFoundException - if no identity found for input parameters
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • createIdentity

        public fr.paris.lutece.plugins.identitystore.v1.web.rs.dto.IdentityDto createIdentity​(fr.paris.lutece.plugins.identitystore.v1.web.rs.dto.IdentityChangeDto identityChange)
                                                                                       throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Creates an identity only if the identity does not already exist. The identity is created from the provided attributes. The order to test if the identity exists: - by using the provided customer id if present - by using the provided connection id if present
        Parameters:
        identityChange - change to apply to identity
        Returns:
        the created identity
        Throws:
        fr.paris.lutece.portal.service.util.AppException - if error occured while updating identity
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • deleteIdentity

        public void deleteIdentity​(String strConnectionId,
                                   String strApplicationCode)
                            throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Deletes an identity from the specified connectionId
        Parameters:
        strConnectionId - the connection id
        strApplicationCode - the application code
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • downloadFileAttribute

        public InputStream downloadFileAttribute​(String strConnectionId,
                                                 String strCustomerId,
                                                 String strAttributeKey,
                                                 String strClientAppCode)
        Parameters:
        strConnectionId - connection Id (can be null if strCustomerId is provided)
        strCustomerId - customer Id (can be null if strConnectionId is provided)
        strAttributeKey - attribute Key (must match a an attribute of type file)
        strClientAppCode - application code of calling application
        Returns:
        inputstream of attribute file
        Throws:
        fr.paris.lutece.portal.service.util.AppException - if error occured while retrieving file attribute
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityNotFoundException - if no identity found for input parameters
      • certifyAttributes

        public fr.paris.lutece.plugins.identitystore.v1.web.rs.dto.IdentityDto certifyAttributes​(fr.paris.lutece.plugins.identitystore.v1.web.rs.dto.IdentityChangeDto identityChange,
                                                                                                 String strCertifierCode)
                                                                                          throws fr.paris.lutece.portal.service.util.AppException,
                                                                                                 fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        certify attributes from an identity
        Parameters:
        identityChange - change to apply to identity
        strCertifierCode - the certifier code ID
        Returns:
        the created identity
        Throws:
        fr.paris.lutece.portal.service.util.AppException - if error occured while updating identity
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException