Class ArchiveUnitProfileManager


  • public class ArchiveUnitProfileManager
    extends java.lang.Object
    This class manage validation and log operation of profile service
    • Field Detail

      • EMPTY_REQUIRED_FIELD

        public static final java.lang.String EMPTY_REQUIRED_FIELD
        See Also:
        Constant Field Values
      • WRONG_FIELD_FORMAT

        public static final java.lang.String WRONG_FIELD_FORMAT
        See Also:
        Constant Field Values
      • DUPLICATE_IN_DATABASE

        public static final java.lang.String DUPLICATE_IN_DATABASE
        See Also:
        Constant Field Values
      • INVALID_JSON_SCHEMA

        public static final java.lang.String INVALID_JSON_SCHEMA
        See Also:
        Constant Field Values
      • UPDATE_AUP_NOT_FOUND

        public static final java.lang.String UPDATE_AUP_NOT_FOUND
        See Also:
        Constant Field Values
      • UPDATE_VALUE_NOT_IN_ENUM

        public static final java.lang.String UPDATE_VALUE_NOT_IN_ENUM
        See Also:
        Constant Field Values
      • UPDATE_DUPLICATE_IN_DATABASE

        public static final java.lang.String UPDATE_DUPLICATE_IN_DATABASE
        See Also:
        Constant Field Values
    • Method Detail

      • logValidationError

        public void logValidationError​(java.lang.String eventType,
                                       java.lang.String objectId,
                                       java.lang.String errorsDetails,
                                       java.lang.String KOEventType)
                                throws VitamException
        Log validation error (business error)
        Parameters:
        errorsDetails -
        Throws:
        VitamException
      • logFatalError

        public void logFatalError​(java.lang.String eventType,
                                  java.lang.String objectId,
                                  java.lang.String errorsDetails)
                           throws VitamException
        log fatal error (system or technical error)
        Parameters:
        errorsDetails -
        Throws:
        VitamException
      • logStarted

        public void logStarted​(java.lang.String eventType,
                               java.lang.String objectId)
                        throws VitamException
        log start process
        Throws:
        VitamException
      • logSuccess

        public void logSuccess​(java.lang.String eventType,
                               java.lang.String objectId,
                               java.lang.String message)
                        throws VitamException
        log end success process
        Throws:
        VitamException
      • createMandatoryParamsValidator

        public ArchiveUnitProfileValidator createMandatoryParamsValidator()
        Validate that profile have not a missing mandatory parameter
        Returns:
      • createWrongFieldFormatValidator

        public ArchiveUnitProfileValidator createWrongFieldFormatValidator()
        Set a default value if null and check for wrong data type/format/value for fields
        Returns:
        the validator with thrown errors
      • checkEmptyIdentifierSlaveModeValidator

        public ArchiveUnitProfileValidator checkEmptyIdentifierSlaveModeValidator()
        Check if the Id of the archive unit profile is empty
        Returns:
      • createCheckDuplicateInDatabaseValidator

        public ArchiveUnitProfileValidator createCheckDuplicateInDatabaseValidator()
        Check if the profile identifier already exists in database
        Returns:
      • createJsonSchemaValidator

        public ArchiveUnitProfileValidator createJsonSchemaValidator()
        Check if the archive unit ControlSchema property is a valid jon schema .
        Returns:
      • createCheckUsedJsonSchema

        public ArchiveUnitProfileValidator createCheckUsedJsonSchema()
        Check if the ArchiveUnitProfile is used in a ArchiveUnit
        Returns: