Class IdentityValidator
java.lang.Object
fr.paris.lutece.plugins.identitystore.v3.web.request.validator.IdentityValidator
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckIdentityDeletedStatusForDelete(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, 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, String cuid, String guid) When the searched identity was merged, returns an IdentitySearchMessage to indicate that the returned Identity is the consolidated identity.
-
Method Details
-
instance
-
checkIdentityLastUpdateDate
public void checkIdentityLastUpdateDate(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.IdentityDto existingIdentityToUpdate, Timestamp requestLastUpdateDate) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceConsistencyException Checks 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.ResourceConsistencyException Checks 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.ResourceConsistencyException Checks 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.ResourceConsistencyException Checks 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.ResourceConsistencyException Checks 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.ResourceConsistencyException Checks 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, String cuid, 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
-