Class GenericContractValidator.GenericRejectionCause
- java.lang.Object
-
- fr.gouv.vitam.functional.administration.core.contract.GenericContractValidator.GenericRejectionCause
-
- Enclosing interface:
- GenericContractValidator<T extends AbstractContractModel>
public static class GenericContractValidator.GenericRejectionCause extends java.lang.ObjectGeneric Rejection Cause inner class
-
-
Constructor Summary
Constructors Constructor Description GenericRejectionCause(java.lang.String error)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetReason()Get Reasonstatic GenericContractValidator.GenericRejectionCauserejectArchiveProfileNotFoundInDatabase(java.lang.String contractName)Verify for each contract that all archive profiles exists in databasestatic GenericContractValidator.GenericRejectionCauserejectAuNotFoundInDatabase(java.lang.String linkParentId)Reject if the id of the AU is not in filing schemastatic GenericContractValidator.GenericRejectionCauserejectDuplicatedInDatabase(java.lang.String contractName)Verify for each contract if already exists one in database that have the same name.static GenericContractValidator.GenericRejectionCauserejectDuplicateVersionRetentionPolicyUsage(java.lang.String fieldName, java.lang.String contractName)static GenericContractValidator.GenericRejectionCauserejectExceptionOccurred(java.lang.String contractName, java.lang.String msg, java.lang.Throwable e)Generate RejectionCause from any throwablestatic GenericContractValidator.GenericRejectionCauserejectExcludedAndRootUnitsNotFound(java.lang.String contractName, java.lang.String guidArrayAsString)Generate RejectionCause for not found unit for given GUIDstatic GenericContractValidator.GenericRejectionCauserejectExcludedRootUnitsNotFound(java.lang.String contractName, java.lang.String guidArrayAsString)Generate RejectionCause for not found unit for given GUIDstatic GenericContractValidator.GenericRejectionCauserejectFormatFileTypeNotFoundInDatabase(java.lang.String contractName)Verify for each contract that all archive profiles exists in databasestatic GenericContractValidator.GenericRejectionCauserejectIdNotAllowedInCreate(java.lang.String contractName)Reject if id exisit and the action is creation.static GenericContractValidator.GenericRejectionCauserejectInconsistentContract(java.lang.String contractName, java.lang.String reason)static GenericContractValidator.GenericRejectionCauserejectInvalidVersionRetentionPolicyParamOfUsage(java.lang.String fieldName, java.lang.String UsageName, java.lang.String contractName)Reject if versionRentionPolicy parameter is invalidstatic GenericContractValidator.GenericRejectionCauserejectInvalidVersionRetentionPolicyUsage(java.lang.String fieldName, java.lang.String contractName)static GenericContractValidator.GenericRejectionCauserejectMandatoryMissing(java.lang.String fieldName)Reject if one of multiple mandatory parameter are nullstatic GenericContractValidator.GenericRejectionCauserejectMCNotFoundInDatabase(java.lang.String managementContractID)Reject if the id of the MC is not in databasestatic GenericContractValidator.GenericRejectionCauserejectRootUnitsNotFound(java.lang.String contractName, java.lang.String guidArrayAsString)Generate RejectionCause for not found unit for given GUIDstatic GenericContractValidator.GenericRejectionCauserejectStorageStrategyDoesNotContainsOneReferent(java.lang.String storageStrategy, java.lang.String fieldName)Reject if storage strategy does not contains referentstatic GenericContractValidator.GenericRejectionCauserejectStorageStrategyMissing(java.lang.String storageStrategy, java.lang.String fieldName)Reject if storage strategy was not found
-
-
-
Method Detail
-
rejectIdNotAllowedInCreate
public static GenericContractValidator.GenericRejectionCause rejectIdNotAllowedInCreate(java.lang.String contractName)
Reject if id exisit and the action is creation. If id exists, it should be an update instead of create- Parameters:
contractName-- Returns:
- GenericRejectionCause
-
rejectAuNotFoundInDatabase
public static GenericContractValidator.GenericRejectionCause rejectAuNotFoundInDatabase(java.lang.String linkParentId)
Reject if the id of the AU is not in filing schema- Parameters:
linkParentId-- Returns:
- GenericRejectionCause
-
rejectMCNotFoundInDatabase
public static GenericContractValidator.GenericRejectionCause rejectMCNotFoundInDatabase(java.lang.String managementContractID)
Reject if the id of the MC is not in database- Parameters:
managementContractID-- Returns:
- GenericRejectionCause
-
rejectDuplicatedInDatabase
public static GenericContractValidator.GenericRejectionCause rejectDuplicatedInDatabase(java.lang.String contractName)
Verify for each contract 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:
contractName-- Returns:
- GenericRejectionCause
-
rejectArchiveProfileNotFoundInDatabase
public static GenericContractValidator.GenericRejectionCause rejectArchiveProfileNotFoundInDatabase(java.lang.String contractName)
Verify for each contract that all archive profiles exists in database- Parameters:
contractName-- Returns:
- GenericRejectionCause
-
rejectExceptionOccurred
public static GenericContractValidator.GenericRejectionCause rejectExceptionOccurred(java.lang.String contractName, java.lang.String msg, java.lang.Throwable e)
Generate RejectionCause from any throwable- Parameters:
contractName- the contract name or identifiermsg- custom messagee- throwable- Returns:
- GenericRejectionCause
-
rejectRootUnitsNotFound
public static GenericContractValidator.GenericRejectionCause rejectRootUnitsNotFound(java.lang.String contractName, java.lang.String guidArrayAsString)
Generate RejectionCause for not found unit for given GUID- Parameters:
contractName- the contract name or identifierguidArrayAsString- root units as string (guid array as string)- Returns:
- GenericRejectionCause
-
rejectExcludedRootUnitsNotFound
public static GenericContractValidator.GenericRejectionCause rejectExcludedRootUnitsNotFound(java.lang.String contractName, java.lang.String guidArrayAsString)
Generate RejectionCause for not found unit for given GUID- Parameters:
contractName- the contract name or identifierguidArrayAsString- root units as string (guid array as string)- Returns:
- GenericRejectionCause
-
rejectExcludedAndRootUnitsNotFound
public static GenericContractValidator.GenericRejectionCause rejectExcludedAndRootUnitsNotFound(java.lang.String contractName, java.lang.String guidArrayAsString)
Generate RejectionCause for not found unit for given GUID- Parameters:
contractName- the contract name or identifierguidArrayAsString- root units as string (guid array as string)- Returns:
- GenericRejectionCause
-
rejectMandatoryMissing
public static GenericContractValidator.GenericRejectionCause rejectMandatoryMissing(java.lang.String fieldName)
Reject if one of multiple mandatory parameter are null- Parameters:
fieldName-- Returns:
- GenericRejectionCause
-
rejectFormatFileTypeNotFoundInDatabase
public static GenericContractValidator.GenericRejectionCause rejectFormatFileTypeNotFoundInDatabase(java.lang.String contractName)
Verify for each contract that all archive profiles exists in database- Parameters:
contractName-- Returns:
- GenericRejectionCause
-
rejectInconsistentContract
public static GenericContractValidator.GenericRejectionCause rejectInconsistentContract(java.lang.String contractName, java.lang.String reason)
-
rejectStorageStrategyMissing
public static GenericContractValidator.GenericRejectionCause rejectStorageStrategyMissing(java.lang.String storageStrategy, java.lang.String fieldName)
Reject if storage strategy was not found- Parameters:
storageStrategy-fieldName-- Returns:
- GenericRejectionCause
-
rejectStorageStrategyDoesNotContainsOneReferent
public static GenericContractValidator.GenericRejectionCause rejectStorageStrategyDoesNotContainsOneReferent(java.lang.String storageStrategy, java.lang.String fieldName)
Reject if storage strategy does not contains referent- Parameters:
storageStrategy-fieldName-- Returns:
- GenericRejectionCause
-
rejectInvalidVersionRetentionPolicyParamOfUsage
public static GenericContractValidator.GenericRejectionCause rejectInvalidVersionRetentionPolicyParamOfUsage(java.lang.String fieldName, java.lang.String UsageName, java.lang.String contractName)
Reject if versionRentionPolicy parameter is invalid- Parameters:
initialVersion-fieldName-- Returns:
- GenericRejectionCause
-
rejectInvalidVersionRetentionPolicyUsage
public static GenericContractValidator.GenericRejectionCause rejectInvalidVersionRetentionPolicyUsage(java.lang.String fieldName, java.lang.String contractName)
-
rejectDuplicateVersionRetentionPolicyUsage
public static GenericContractValidator.GenericRejectionCause rejectDuplicateVersionRetentionPolicyUsage(java.lang.String fieldName, java.lang.String contractName)
-
getReason
public java.lang.String getReason()
Get Reason- Returns:
- the reason
-
-