Class IdentityAttributeValidationService
- java.lang.Object
-
- fr.paris.lutece.plugins.identitystore.service.attribute.IdentityAttributeValidationService
-
public class IdentityAttributeValidationService extends Object
Service class used to validate attribute values in requests
-
-
Constructor Summary
Constructors Constructor Description IdentityAttributeValidationService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdentityAttributeValidationServiceinstance()voidvalidateIdentityAttributeValues(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto identity, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ChangeResponse response)Validates all attribute values stored in the provided identity, according to each attribute validation regex.voidvalidatePivotAttributesIntegrity(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto existingIdentityDto, String clientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto identity, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ChangeResponse response)Validates the integrity of pivot attributes stored in the provided identity.
If a pivot attribute is present and certified with a process with a greater or equal level to the defined process in configuration, then ALL the pivot attributes need to be present and certified with the same certification process.
If the birthcountry code attribute is set and doesn't correspond to FRANCE, then the birthplace code attribute is allowed to be missing.
If the above rules are not fullfiled, the response status is put to FAILURE.
-
-
-
Method Detail
-
instance
public static IdentityAttributeValidationService instance()
-
validateIdentityAttributeValues
public void validateIdentityAttributeValues(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto identity, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ChangeResponse response) throws IdentityAttributeNotFoundExceptionValidates all attribute values stored in the provided identity, according to each attribute validation regex. Adds validation error statuses in the response in case of invalid values, and put the status to FAILURE.- Parameters:
identity- the identityresponse- the response- Throws:
IdentityAttributeNotFoundException
-
validatePivotAttributesIntegrity
public void validatePivotAttributesIntegrity(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto existingIdentityDto, String clientCode, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto identity, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ChangeResponse response) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionValidates the integrity of pivot attributes stored in the provided identity.
If a pivot attribute is present and certified with a process with a greater or equal level to the defined process in configuration, then ALL the pivot attributes need to be present and certified with the same certification process.
If the birthcountry code attribute is set and doesn't correspond to FRANCE, then the birthplace code attribute is allowed to be missing.
If the above rules are not fullfiled, the response status is put to FAILURE.- Parameters:
cuid- the cuididentityRequest- the identity requestresponse- the response- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
-