Class IdentityService
- java.lang.Object
-
- fr.paris.lutece.plugins.identitystore.v2.web.service.IdentityService
-
public class IdentityService extends java.lang.ObjectIdentityService
-
-
Constructor Summary
Constructors Constructor Description IdentityService()Simple ConstructorIdentityService(IIdentityTransportProvider transportProvider)Constructor with IIdentityTransportProvider in parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityDtocreateIdentity(fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityChangeDto identityChange)Creates an identity only if the identity does not already exist.voiddeleteIdentity(java.lang.String strConnectionId, java.lang.String strApplicationCode)Deletes an identity from the specified connectionIdjava.io.InputStreamdownloadFileAttribute(java.lang.String strConnectionId, java.lang.String strCustomerId, java.lang.String strAttributeKey, java.lang.String strClientAppCode)fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.ApplicationRightsDtogetApplicationRights(java.lang.String strClientAppCode)retrieve application rights on attributsjava.util.List<fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityDto>getIdentities(java.util.Map<java.lang.String,java.util.List<java.lang.String>> mapAttributeValues, java.util.List<java.lang.String> listAttributeKeyNames, java.lang.String strClientApplicationCode)returns a list of identity from combination of attributesfr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityDtogetIdentity(java.lang.String strConnectionId, java.lang.String strCustomerId, java.lang.String strApplicationCode)get identity matching connectionId and customerId for provided application codefr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityDtogetIdentityByConnectionId(java.lang.String strConnectionId, java.lang.String strApplicationCode)get identity matching connectionId for provided application codefr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityDtogetIdentityByCustomerId(java.lang.String strCustomerId, java.lang.String strApplicationCode)get identity matching customerId for provided application codevoidsetTransportProvider(IIdentityTransportProvider transportProvider)setter of transportProvider parameterfr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityDtoupdateIdentity(fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityChangeDto identityChange, java.util.Map<java.lang.String,org.apache.commons.fileupload.FileItem> mapFiles)apply changes to an identity
-
-
-
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.v2.web.rs.dto.IdentityDto getIdentityByConnectionId(java.lang.String strConnectionId, java.lang.String strApplicationCode) throws fr.paris.lutece.portal.service.util.AppException, fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionget identity matching connectionId for provided application code- Parameters:
strConnectionId- connection IdstrApplicationCode- 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.v2.web.rs.dto.IdentityDto getIdentityByCustomerId(java.lang.String strCustomerId, java.lang.String strApplicationCode) throws fr.paris.lutece.portal.service.util.AppException, fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionget identity matching customerId for provided application code- Parameters:
strCustomerId- customer IdstrApplicationCode- 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.v2.web.rs.dto.IdentityDto getIdentity(java.lang.String strConnectionId, java.lang.String strCustomerId, java.lang.String strApplicationCode) throws fr.paris.lutece.portal.service.util.AppException, fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionget 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.v2.web.rs.dto.IdentityDto updateIdentity(fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityChangeDto identityChange, java.util.Map<java.lang.String,org.apache.commons.fileupload.FileItem> mapFiles) throws fr.paris.lutece.portal.service.util.AppException, fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionapply changes to an identity- Parameters:
identityChange- change to apply to identitymapFiles- fileitem map to upload- Returns:
- the updated identity
- Throws:
fr.paris.lutece.portal.service.util.AppException- if error occured while updating identityfr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
createIdentity
public fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityDto createIdentity(fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityChangeDto identityChange) throws fr.paris.lutece.portal.service.util.AppException, fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionCreates 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 identityfr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
deleteIdentity
public void deleteIdentity(java.lang.String strConnectionId, java.lang.String strApplicationCode) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionDeletes an identity from the specified connectionId- Parameters:
strConnectionId- the connection idstrApplicationCode- the application code- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
downloadFileAttribute
public java.io.InputStream downloadFileAttribute(java.lang.String strConnectionId, java.lang.String strCustomerId, java.lang.String strAttributeKey, java.lang.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
-
getApplicationRights
public fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.ApplicationRightsDto getApplicationRights(java.lang.String strClientAppCode) throws fr.paris.lutece.portal.service.util.AppException, fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionretrieve application rights on attributs- Parameters:
strClientAppCode- application code of calling application- Returns:
- ApplicationRightsDto for the given application
- Throws:
fr.paris.lutece.portal.service.util.AppException- if error occuredfr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
getIdentities
public java.util.List<fr.paris.lutece.plugins.identitystore.v2.web.rs.dto.IdentityDto> getIdentities(java.util.Map<java.lang.String,java.util.List<java.lang.String>> mapAttributeValues, java.util.List<java.lang.String> listAttributeKeyNames, java.lang.String strClientApplicationCode) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionreturns a list of identity from combination of attributes- Parameters:
mapAttributeValues- a map that associates list of values to search for some attributeslistAttributeKeyNames- a list of attributes to retrieve in identitiesstrClientApplicationCode- application code who requested identities- Returns:
- identity filled according to application rights for user identified by connection id
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
-