public abstract class IdentityStoreRequest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ERROR_JSON_MAPPING |
protected static String |
ERROR_NO_IDENTITY_PROVIDED |
| Constructor and Description |
|---|
IdentityStoreRequest() |
| Modifier and Type | Method and Description |
|---|---|
protected Identity |
createIdentity(fr.paris.lutece.plugins.identitystore.web.rs.dto.IdentityChangeDto identityChangeDto,
Map<String,fr.paris.lutece.portal.business.file.File> mapAttachedFiles)
Creates an identity.
|
protected Identity |
createIdentity(String strConnectionId)
Initializes an identity from an external source by using the specified connection id
|
String |
doRequest()
Do the request, call the inner validRequest and doSpecificRequest
|
protected abstract String |
doSpecificRequest()
Specific action for the request
|
protected Identity |
getOrCreateIdentity(String strConnectionId,
String strCustomerId,
String strClientAppCode)
get identity from connectionId or customerId If no identity is found then a new one be created with attributes based on external provider data
|
protected void |
updateAttributes(Identity identity,
fr.paris.lutece.plugins.identitystore.web.rs.dto.IdentityDto identityDto,
fr.paris.lutece.plugins.identitystore.web.rs.dto.AuthorDto authorDto,
Map<String,fr.paris.lutece.portal.business.file.File> mapAttachedFiles)
check if new identity attributes have errors and returns them
|
protected Identity |
updateIdentity(Identity identity,
fr.paris.lutece.plugins.identitystore.web.rs.dto.IdentityChangeDto identityChangeDto,
Map<String,fr.paris.lutece.portal.business.file.File> mapAttachedFiles)
Updates an existing identity.
|
protected abstract void |
validRequest()
Valid the request according to parameter
|
protected static final String ERROR_NO_IDENTITY_PROVIDED
protected static final String ERROR_JSON_MAPPING
protected abstract void validRequest()
throws fr.paris.lutece.portal.service.util.AppException
fr.paris.lutece.portal.service.util.AppException - if request not validprotected abstract String doSpecificRequest() throws fr.paris.lutece.portal.service.util.AppException
fr.paris.lutece.portal.service.util.AppException - in case of request failpublic String doRequest() throws fr.paris.lutece.portal.service.util.AppException
fr.paris.lutece.portal.service.util.AppException - in case of failureprotected Identity getOrCreateIdentity(String strConnectionId, String strCustomerId, String strClientAppCode)
strConnectionId - connection idstrCustomerId - customer idstrClientAppCode - client application codefr.paris.lutece.portal.service.util.AppException - if provided connectionId and customerId are not consistentprotected Identity createIdentity(String strConnectionId) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityNotFoundException
strConnectionId - the connection id used to initialize the identityfr.paris.lutece.plugins.identitystore.web.exception.IdentityNotFoundException - if no identity can be retrieve from external sourceprotected Identity createIdentity(fr.paris.lutece.plugins.identitystore.web.rs.dto.IdentityChangeDto identityChangeDto, Map<String,fr.paris.lutece.portal.business.file.File> mapAttachedFiles)
Identity is done, otherwise, the provided identity is used.identityChangeDto - the object IdentityChangeDto containing the information to perform the creationmapAttachedFiles - the files to createprotected Identity updateIdentity(Identity identity, fr.paris.lutece.plugins.identitystore.web.rs.dto.IdentityChangeDto identityChangeDto, Map<String,fr.paris.lutece.portal.business.file.File> mapAttachedFiles)
identity - the identity to complete.identityChangeDto - the object IdentityChangeDto containing the information to perform the creationmapAttachedFiles - the files to createprotected void updateAttributes(Identity identity, fr.paris.lutece.plugins.identitystore.web.rs.dto.IdentityDto identityDto, fr.paris.lutece.plugins.identitystore.web.rs.dto.AuthorDto authorDto, Map<String,fr.paris.lutece.portal.business.file.File> mapAttachedFiles)
identity - the identityidentityDto - new identity to update connectionId of identity which will be updatedauthorDto - author responsible for modificationmapAttachedFiles - map containing File matching key attribute nameCopyright © 2016 City of Paris. All rights reserved.