Package fr.gouv.vitam.functional.administration.core.archiveunitprofiles

# Class ArchiveUnitProfileManager

java.lang.Object
fr.gouv.vitam.functional.administration.core.archiveunitprofiles.ArchiveUnitProfileManager

public class ArchiveUnitProfileManager extends Object
This class manage validation and log operation of profile service

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DUPLICATE_IN_DATABASE`
  `static final String`
  `EMPTY_REQUIRED_FIELD`
  `static final String`
  `IMPORT_KO`
  `static final String`
  `INVALID_JSON_SCHEMA`
  `static final String`
  `UPDATE_AUP_NOT_FOUND`
  `static final String`
  `UPDATE_DUPLICATE_IN_DATABASE`
  `static final String`
  `UPDATE_KO`
  `static final String`
  `UPDATE_VALUE_NOT_IN_ENUM`
  `static final String`
  `WRONG_FIELD_FORMAT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ArchiveUnitProfileManager(LogbookOperationsClient logbookClient, MetaDataClient metaDataClient, GUID eip)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ArchiveUnitProfileValidator`
  `checkEmptyIdentifierSlaveModeValidator()`
  Check if the Id of the archive unit profile is empty
  `ArchiveUnitProfileValidator`
  `createCheckDuplicateInDatabaseValidator()`
  Check if the profile identifier already exists in database
  `ArchiveUnitProfileValidator`
  `createCheckUsedJsonSchema()`
  Check if the ArchiveUnitProfile is used in a ArchiveUnit
  `ArchiveUnitProfileValidator`
  `createJsonSchemaValidator()`
  Check if the archive unit ControlSchema property is a valid jon schema .
  `ArchiveUnitProfileValidator`
  `createMandatoryParamsValidator()`
  Validate that profile have not a missing mandatory parameter
  `ArchiveUnitProfileValidator`
  `createWrongFieldFormatValidator()`
  Set a default value if null and check for wrong data type/format/value for fields
  `void`
  `logFatalError(String eventType, String objectId, String errorsDetails)`
  log fatal error (system or technical error)
  `void`
  `logStarted(String eventType, String objectId)`
  log start process
  `void`
  `logSuccess(String eventType, String objectId, String message)`
  log end success process
  `void`
  `logValidationError(String eventType, String objectId, String errorsDetails, String KOEventType)`
  Log validation error (business error)
  `boolean`
  `validateArchiveUnitProfile(ArchiveUnitProfileModel profile, VitamError error)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### EMPTY_REQUIRED_FIELD

    public static final String EMPTY_REQUIRED_FIELD
    See Also:
      - Constant Field Values

  - ### WRONG_FIELD_FORMAT

    public static final String WRONG_FIELD_FORMAT
    See Also:
      - Constant Field Values

  - ### DUPLICATE_IN_DATABASE

    public static final String DUPLICATE_IN_DATABASE
    See Also:
      - Constant Field Values

  - ### INVALID_JSON_SCHEMA

    public static final String INVALID_JSON_SCHEMA
    See Also:
      - Constant Field Values

  - ### IMPORT_KO

    public static final String IMPORT_KO
    See Also:
      - Constant Field Values

  - ### UPDATE_AUP_NOT_FOUND

    public static final String UPDATE_AUP_NOT_FOUND
    See Also:
      - Constant Field Values

  - ### UPDATE_VALUE_NOT_IN_ENUM

    public static final String UPDATE_VALUE_NOT_IN_ENUM
    See Also:
      - Constant Field Values

  - ### UPDATE_DUPLICATE_IN_DATABASE

    public static final String UPDATE_DUPLICATE_IN_DATABASE
    See Also:
      - Constant Field Values

  - ### UPDATE_KO

    public static final String UPDATE_KO
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ArchiveUnitProfileManager

    public ArchiveUnitProfileManager(LogbookOperationsClient logbookClient, MetaDataClient metaDataClient, GUID eip)

- ## Method Details

  - ### validateArchiveUnitProfile

    public boolean validateArchiveUnitProfile(ArchiveUnitProfileModel profile, VitamError error)

  - ### 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

    public void logStarted(String eventType, String objectId) throws VitamException
    log start process
    Throws:
      `VitamException`

  - ### logSuccess

    public void logSuccess(String eventType, String objectId, 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: