Class ArchiveUnitProfileManager
java.lang.Object
fr.gouv.vitam.functional.administration.core.archiveunitprofiles.ArchiveUnitProfileManager
This class manage validation and log operation of profile service
-
Field Summary
-
Constructor Summary
ConstructorDescriptionArchiveUnitProfileManager
(LogbookOperationsClient logbookClient, MetaDataClient metaDataClient, GUID eip) -
Method Summary
Modifier and TypeMethodDescriptionCheck if the Id of the archive unit profile is emptyCheck if the profile identifier already exists in databaseCheck if the ArchiveUnitProfile is used in a ArchiveUnitCheck if the archive unit ControlSchema property is a valid jon schema .Validate that profile have not a missing mandatory parameterSet a default value if null and check for wrong data type/format/value for fieldsvoid
logFatalError
(String eventType, String objectId, String errorsDetails) log fatal error (system or technical error)void
logStarted
(String eventType, String objectId) log start processvoid
logSuccess
(String eventType, String objectId, String message) log end success processvoid
logValidationError
(String eventType, String objectId, String errorsDetails, String KOEventType) Log validation error (business error)boolean
validateArchiveUnitProfile
(ArchiveUnitProfileModel profile, VitamError error)
-
Field Details
-
EMPTY_REQUIRED_FIELD
- See Also:
-
WRONG_FIELD_FORMAT
- See Also:
-
DUPLICATE_IN_DATABASE
- See Also:
-
INVALID_JSON_SCHEMA
- See Also:
-
IMPORT_KO
- See Also:
-
UPDATE_AUP_NOT_FOUND
- See Also:
-
UPDATE_VALUE_NOT_IN_ENUM
- See Also:
-
UPDATE_DUPLICATE_IN_DATABASE
- See Also:
-
UPDATE_KO
- See Also:
-
-
Constructor Details
-
ArchiveUnitProfileManager
public ArchiveUnitProfileManager(LogbookOperationsClient logbookClient, MetaDataClient metaDataClient, GUID eip)
-
-
Method Details
-
validateArchiveUnitProfile
-
logValidationError
public void logValidationError(String eventType, String objectId, String errorsDetails, String KOEventType) throws VitamException Log validation error (business error)- Parameters:
errorsDetails
-- Throws:
VitamException
-
logFatalError
public void logFatalError(String eventType, String objectId, String errorsDetails) throws VitamException log fatal error (system or technical error)- Parameters:
errorsDetails
-- Throws:
VitamException
-
logStarted
log start process- Throws:
VitamException
-
logSuccess
log end success process- Throws:
VitamException
-
createMandatoryParamsValidator
Validate that profile have not a missing mandatory parameter- Returns:
-
createWrongFieldFormatValidator
Set a default value if null and check for wrong data type/format/value for fields- Returns:
- the validator with thrown errors
-
checkEmptyIdentifierSlaveModeValidator
Check if the Id of the archive unit profile is empty- Returns:
-
createCheckDuplicateInDatabaseValidator
Check if the profile identifier already exists in database- Returns:
-
createJsonSchemaValidator
Check if the archive unit ControlSchema property is a valid jon schema .- Returns:
-
createCheckUsedJsonSchema
Check if the ArchiveUnitProfile is used in a ArchiveUnit- Returns:
-