Package fr.gouv.vitam.functional.administration.core.archiveunitprofiles

# Class ArchiveUnitProfileValidator.RejectionCause

java.lang.Object
fr.gouv.vitam.functional.administration.core.archiveunitprofiles.ArchiveUnitProfileValidator.RejectionCause

Enclosing interface:
  `ArchiveUnitProfileValidator`

public static class ArchiveUnitProfileValidator.RejectionCause extends Object
Rejection Cause

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RejectionCause(String error)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getReason()`
  Get reason
  `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.
  `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.
  `static ArchiveUnitProfileValidator.RejectionCause`
  `rejectIdNotAllowedInCreate(String archiveUnitProfileIdentifier)`
  Reject if id exisit and the action is creation.
  `static ArchiveUnitProfileValidator.RejectionCause`
  `rejectIncorrectFieldInOntology(String fieldName)`
  Reject if one field is not compatible with the one declared in ontology
  `static ArchiveUnitProfileValidator.RejectionCause`
  `rejectJsonSchemaModificationIfInUse(String fieldName)`
  Reject if the field is not a json shema
  `static ArchiveUnitProfileValidator.RejectionCause`
  `rejectJsonShema(String fieldName)`
  Reject if the field is not a json shema
  `static ArchiveUnitProfileValidator.RejectionCause`
  `rejectMandatoryMissing(String fieldName)`
  Reject if one of multiple mandatory parameter are null
  `static ArchiveUnitProfileValidator.RejectionCause`
  `rejectMissingFieldInOntology(String fieldName)`
  Reject if one field is not declared in ontology

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RejectionCause

    public RejectionCause(String error)
    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

    public static ArchiveUnitProfileValidator.RejectionCause rejectJsonShema(String fieldName)
    Reject if the field is not a json shema
    Parameters:
      `fieldName` -
    Returns:
      RejectionCause

  - ### rejectMandatoryMissing

    public static ArchiveUnitProfileValidator.RejectionCause rejectMandatoryMissing(String fieldName)
    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

    public String getReason()
    Get reason
    Returns:
      reason