Class ContextValidator.ContextRejectionCause
java.lang.Object
fr.gouv.vitam.functional.administration.core.context.ContextValidator.ContextRejectionCause
- Enclosing interface:
- ContextValidator
Context Rejection Cause inner class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget reasoninvalidSecurityProfile
(String securityProfileIdentifier) rejectDuplicatedInDatabase
(String contextName) Verify for each context if already exists one in database that have the same name.rejectIdNotAllowedInCreate
(String contextIdentifier) Reject if id exisit and the action is creation.rejectMandatoryMissing
(String fieldName) Reject if one of multiple mandatory parameter are nullrejectNoExistanceOfAccessContract
(String contextName, Integer tenant) rejectNoExistanceOfIngestContract
(String contextName, Integer tenant) rejectNoExistanceOfTenant
(Integer tenantId) Reject if the tenant does not existReject if the tenant does not exist
-
Constructor Details
-
ContextRejectionCause
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
Reject if one of multiple mandatory parameter are null- Parameters:
fieldName
-- Returns:
- ContextRejectionCause
-
rejectDuplicatedInDatabase
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
Reject if the tenant does not exist- Parameters:
tenantId
- the tenant id- Returns:
- 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
get reason- Returns:
- reason
-