Class ProfileValidator.RejectionCause
- java.lang.Object
-
- fr.gouv.vitam.functional.administration.core.profile.ProfileValidator.RejectionCause
-
- Enclosing interface:
- ProfileValidator
public static class ProfileValidator.RejectionCause extends java.lang.Object
Rejection Cause
-
-
Constructor Summary
Constructors Constructor Description RejectionCause(java.lang.String error)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getReason()
Get reasonstatic ProfileValidator.RejectionCause
rejectDuplicatedInDatabase(java.lang.String identifier)
Verify for each profile if already exists one in database that have the same identifier and/or name.static ProfileValidator.RejectionCause
rejectIdNotAllowedInCreate(java.lang.String profileIdentifier)
Reject if id exisit and the action is creation.static ProfileValidator.RejectionCause
rejectMandatoryMissing(java.lang.String fieldName)
Reject if one of multiple mandatory parameter are nullstatic ProfileValidator.RejectionCause
rejectSeveralMandatoryMissing(java.util.List<java.lang.String> fieldsName)
Reject if multiple mandatory parameters are null
-
-
-
Method Detail
-
rejectIdNotAllowedInCreate
public static ProfileValidator.RejectionCause rejectIdNotAllowedInCreate(java.lang.String profileIdentifier)
Reject if id exisit and the action is creation. If id exists, it should be an update instead of create- Parameters:
profileIdentifier
-- Returns:
- RejectionCause
-
rejectDuplicatedInDatabase
public static ProfileValidator.RejectionCause rejectDuplicatedInDatabase(java.lang.String identifier)
Verify for each profile if already exists one in database that have the same identifier and/or name. The database my manage this kind of constraint (by creating an unique index on the field or column)- Parameters:
identifier
-- Returns:
- RejectionCause
-
rejectMandatoryMissing
public static ProfileValidator.RejectionCause rejectMandatoryMissing(java.lang.String fieldName)
Reject if one of multiple mandatory parameter are null- Parameters:
fieldName
-- Returns:
- RejectionCause
-
rejectSeveralMandatoryMissing
public static ProfileValidator.RejectionCause rejectSeveralMandatoryMissing(java.util.List<java.lang.String> fieldsName)
Reject if multiple mandatory parameters are null- Parameters:
fieldsName
-- Returns:
- RejectionCause
-
getReason
public java.lang.String getReason()
Get reason- Returns:
- reason
-
-