Class ContextValidator.ContextRejectionCause

java.lang.Object
fr.gouv.vitam.functional.administration.core.context.ContextValidator.ContextRejectionCause
Enclosing interface:
ContextValidator

public static class ContextValidator.ContextRejectionCause extends Object
Context Rejection Cause inner class
  • Constructor Details

    • ContextRejectionCause

      public ContextRejectionCause(String error)
      Default constructor
      Parameters:
      error - error as a string
  • Method Details

    • rejectIdNotAllowedInCreate

      public static ContextValidator.ContextRejectionCause rejectIdNotAllowedInCreate(String contextIdentifier)
      Reject if id exisit and the action is creation. If id exists, it should be an update instead of create
      Parameters:
      contextIdentifier -
      Returns:
      ContextRejectionCause
    • rejectMandatoryMissing

      public static ContextValidator.ContextRejectionCause rejectMandatoryMissing(String fieldName)
      Reject if one of multiple mandatory parameter are null
      Parameters:
      fieldName -
      Returns:
      ContextRejectionCause
    • rejectDuplicatedInDatabase

      public static ContextValidator.ContextRejectionCause rejectDuplicatedInDatabase(String contextName)
      Verify for each context if already exists one in database that have the same name. The database my manage this kind of constraint (by creating an unique index on the field or column)
      Parameters:
      contextName - the context name
      Returns:
      ContextRejectionCause
    • rejectNoExistanceOfTenant

      public static ContextValidator.ContextRejectionCause rejectNoExistanceOfTenant(Integer tenantId)
      Reject if the tenant does not exist
      Parameters:
      tenantId - the tenant id
      Returns:
      ContextRejectionCause
    • rejectNullTenant

      public static ContextValidator.ContextRejectionCause rejectNullTenant()
      Reject if the tenant does not exist
      Returns:
      ContextRejectionCause
    • rejectNoExistanceOfIngestContract

      public static ContextValidator.ContextRejectionCause rejectNoExistanceOfIngestContract(String contextName, Integer tenant)
      Parameters:
      contextName - the context name
      Returns:
      ContextRejectionCause
    • rejectNoExistanceOfAccessContract

      public static ContextValidator.ContextRejectionCause rejectNoExistanceOfAccessContract(String contextName, Integer tenant)
      Parameters:
      contextName - the context name
      Returns:
      ContextRejectionCause
    • invalidSecurityProfile

      public static ContextValidator.ContextRejectionCause invalidSecurityProfile(String securityProfileIdentifier)
      Parameters:
      securityProfileIdentifier -
      Returns:
      ContextRejectionCause
    • getReason

      public String getReason()
      get reason
      Returns:
      reason