Class ContextValidator.ContextRejectionCause
- java.lang.Object
-
- fr.gouv.vitam.functional.administration.context.core.ContextValidator.ContextRejectionCause
-
- Enclosing interface:
- ContextValidator
public static class ContextValidator.ContextRejectionCause extends java.lang.Object
Context Rejection Cause inner class
-
-
Constructor Summary
Constructors Constructor Description ContextRejectionCause(java.lang.String error)
Default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getReason()
get reasonstatic ContextValidator.ContextRejectionCause
invalidSecurityProfile(java.lang.String securityProfileIdentifier)
static ContextValidator.ContextRejectionCause
rejectDuplicatedInDatabase(java.lang.String contextName)
Verify for each context if already exists one in database that have the same name.static ContextValidator.ContextRejectionCause
rejectIdNotAllowedInCreate(java.lang.String contextIdentifier)
Reject if id exisit and the action is creation.static ContextValidator.ContextRejectionCause
rejectMandatoryMissing(java.lang.String fieldName)
Reject if one of multiple mandatory parameter are nullstatic ContextValidator.ContextRejectionCause
rejectNoExistanceOfAccessContract(java.lang.String contextName, java.lang.Integer tenant)
static ContextValidator.ContextRejectionCause
rejectNoExistanceOfIngestContract(java.lang.String contextName, java.lang.Integer tenant)
static ContextValidator.ContextRejectionCause
rejectNoExistanceOfTenant(java.lang.Integer tenantId)
Reject if the tenant does not existstatic ContextValidator.ContextRejectionCause
rejectNullTenant()
Reject if the tenant does not exist
-
-
-
Method Detail
-
rejectIdNotAllowedInCreate
public static ContextValidator.ContextRejectionCause rejectIdNotAllowedInCreate(java.lang.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(java.lang.String fieldName)
Reject if one of multiple mandatory parameter are null- Parameters:
fieldName
-- Returns:
- ContextRejectionCause
-
rejectDuplicatedInDatabase
public static ContextValidator.ContextRejectionCause rejectDuplicatedInDatabase(java.lang.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(java.lang.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(java.lang.String contextName, java.lang.Integer tenant)
- Parameters:
contextName
- the context name- Returns:
- ContextRejectionCause
-
rejectNoExistanceOfAccessContract
public static ContextValidator.ContextRejectionCause rejectNoExistanceOfAccessContract(java.lang.String contextName, java.lang.Integer tenant)
- Parameters:
contextName
- the context name- Returns:
- ContextRejectionCause
-
invalidSecurityProfile
public static ContextValidator.ContextRejectionCause invalidSecurityProfile(java.lang.String securityProfileIdentifier)
- Parameters:
securityProfileIdentifier
-- Returns:
- ContextRejectionCause
-
getReason
public java.lang.String getReason()
get reason- Returns:
- reason
-
-