Class IdentityValidator
- java.lang.Object
-
- fr.paris.lutece.plugins.identitystore.v3.web.request.validator.IdentityValidator
-
public class IdentityValidator extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckIdentityDeletedStatusForDelete(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto identityToDelete)Checks if the identity to delete is already deletedvoidcheckIdentityDeletedStatusForUpdate(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto existingIdentityToUpdate)Checks if the identity to update is already deletedvoidcheckIdentityLastUpdateDate(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto existingIdentityToUpdate, java.sql.Timestamp requestLastUpdateDate)Checks if the sent last update date correlates with the actual identity's last update datevoidcheckIdentityMergedStatusForMergeCancel(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto primaryIdentity, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto secondaryIdentity)Checks if the secondary identity to unmerge is already merged to the primary identityvoidcheckIdentityMergedStatusForUpdate(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto existingIdentityToUpdate)Checks if the identity to update is not mergedvoidcheckIDentityMergeStatusForDelete(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto identityToDelete)Checks if the identity to update is not mergedstatic IdentityValidatorinstance()fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchMessageverifyIfConsolidatedIdentitySearchResult(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto result, java.lang.String cuid, java.lang.String guid)When the searched identity was merged, returns an IdentitySearchMessage to indicate that the returned Identity is the consolidated identity.
-
-
-
Method Detail
-
instance
public static IdentityValidator instance()
-
checkIdentityLastUpdateDate
public void checkIdentityLastUpdateDate(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto existingIdentityToUpdate, java.sql.Timestamp requestLastUpdateDate) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyExceptionChecks if the sent last update date correlates with the actual identity's last update date- Parameters:
existingIdentityToUpdate- the identityrequestLastUpdateDate- the sent last update date- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyException- if the dates don't correlate
-
checkIdentityMergedStatusForUpdate
public void checkIdentityMergedStatusForUpdate(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto existingIdentityToUpdate) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyExceptionChecks if the identity to update is not merged- Parameters:
existingIdentityToUpdate- the identity- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyException- if the identity is already merged
-
checkIDentityMergeStatusForDelete
public void checkIDentityMergeStatusForDelete(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto identityToDelete) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyExceptionChecks if the identity to update is not merged- Parameters:
identityToDelete- identity to delete- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyException- if identity is merged
-
checkIdentityDeletedStatusForUpdate
public void checkIdentityDeletedStatusForUpdate(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto existingIdentityToUpdate) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyExceptionChecks if the identity to update is already deleted- Parameters:
existingIdentityToUpdate- the identity- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyException- if the identity is already deleted
-
checkIdentityDeletedStatusForDelete
public void checkIdentityDeletedStatusForDelete(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto identityToDelete) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyExceptionChecks if the identity to delete is already deleted- Parameters:
identityToDelete- the identity- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyException- if the identity is already deleted
-
checkIdentityMergedStatusForMergeCancel
public void checkIdentityMergedStatusForMergeCancel(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto primaryIdentity, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto secondaryIdentity) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyExceptionChecks if the secondary identity to unmerge is already merged to the primary identity- Parameters:
primaryIdentity- the primary identitysecondaryIdentity- the secondary identity- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyException- if the secondary identity is not merged to the primary identity
-
verifyIfConsolidatedIdentitySearchResult
public fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchMessage verifyIfConsolidatedIdentitySearchResult(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto result, java.lang.String cuid, java.lang.String guid)When the searched identity was merged, returns an IdentitySearchMessage to indicate that the returned Identity is the consolidated identity.- Parameters:
result- the returned identitycuid- (requested or null)guid- (requested or null)- Returns:
- a warning IdentitySearchMessage
-
-