Class ArchiveUnitProfileValidator.RejectionCause
java.lang.Object
fr.gouv.vitam.functional.administration.core.archiveunitprofiles.ArchiveUnitProfileValidator.RejectionCause
- Enclosing interface:
- ArchiveUnitProfileValidator
Rejection Cause
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet reasonrejectDuplicateIdentifierInDatabase
(String identifier) Verify for each archive unit profile if already exists one in database that have the same identifier and/or name.rejectDuplicateNameInDatabase
(String identifier) Verify for each archive unit profile if already exists one in database that have the same identifier and/or name.rejectIdNotAllowedInCreate
(String archiveUnitProfileIdentifier) Reject if id exisit and the action is creation.rejectIncorrectFieldInOntology
(String fieldName) Reject if one field is not compatible with the one declared in ontologyrejectJsonSchemaModificationIfInUse
(String fieldName) Reject if the field is not a json shemarejectJsonShema
(String fieldName) Reject if the field is not a json shemarejectMandatoryMissing
(String fieldName) Reject if one of multiple mandatory parameter are nullrejectMissingFieldInOntology
(String fieldName) Reject if one field is not declared in ontology
-
Constructor Details
-
RejectionCause
Constructor- Parameters:
error
-
-
-
Method Details
-
rejectIdNotAllowedInCreate
public static ArchiveUnitProfileValidator.RejectionCause rejectIdNotAllowedInCreate(String archiveUnitProfileIdentifier) Reject if id exisit and the action is creation. If id exists, it should be an update instead of create- Parameters:
archiveUnitProfileIdentifier
-- Returns:
- RejectionCause
-
rejectDuplicateIdentifierInDatabase
public static ArchiveUnitProfileValidator.RejectionCause rejectDuplicateIdentifierInDatabase(String identifier) Verify for each archive unit 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
-
rejectDuplicateNameInDatabase
public static ArchiveUnitProfileValidator.RejectionCause rejectDuplicateNameInDatabase(String identifier) Verify for each archive unit 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
-
rejectJsonSchemaModificationIfInUse
public static ArchiveUnitProfileValidator.RejectionCause rejectJsonSchemaModificationIfInUse(String fieldName) Reject if the field is not a json shema- Parameters:
fieldName
-- Returns:
- RejectionCause
-
rejectJsonShema
Reject if the field is not a json shema- Parameters:
fieldName
-- Returns:
- RejectionCause
-
rejectMandatoryMissing
Reject if one of multiple mandatory parameter are null- Parameters:
fieldName
-- Returns:
- RejectionCause
-
rejectMissingFieldInOntology
public static ArchiveUnitProfileValidator.RejectionCause rejectMissingFieldInOntology(String fieldName) Reject if one field is not declared in ontology- Parameters:
fieldName
-- Returns:
- RejectionCause
-
rejectIncorrectFieldInOntology
public static ArchiveUnitProfileValidator.RejectionCause rejectIncorrectFieldInOntology(String fieldName) Reject if one field is not compatible with the one declared in ontology- Parameters:
fieldName
-- Returns:
- RejectionCause
-
getReason
Get reason- Returns:
- reason
-