java.lang.Object
fr.gouv.vitam.functional.administration.core.profile.ProfileManager

public class ProfileManager extends Object
This class manage validation and log operation of profile service
  • Field Details

  • Constructor Details

  • Method Details

    • validateProfile

      public boolean validateProfile(ProfileModel profile, VitamError error)
    • validateProfileFile

      public boolean validateProfileFile(ProfileModel profileModel, File file, VitamError error) throws Exception
      Validate if the profile file is valide XSD => is file xsd is xml valide RNG => if file rng is xml valide, rng valide, check default values if already exists in vitam
      Parameters:
      profileModel -
      file -
      error -
      Returns:
      boolean true/false
      Throws:
      Exception
    • validateXSD

      public boolean validateXSD(File file, VitamError error) throws Exception
      Just check if inputStream is xml valid
      Parameters:
      file -
      error -
      Returns:
      boolean true/false
      Throws:
      Exception
    • validateRNG

      public boolean validateRNG(File file, VitamError error) throws Exception
      TODO 1. Validate if rng is xml valide, 2. Validate if rng is rng valide 3. Validate if data in rng is valide
      Parameters:
      file -
      error -
      Returns:
      boolean true/false
      Throws:
      Exception
    • logValidationError

      public void logValidationError(String eventType, String objectId, String errorsDetails, String eventTypeKO) throws VitamException
      Log validation error (business error)
      Parameters:
      eventType -
      objectId -
      errorsDetails -
      eventTypeKO -
      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 ProfileValidator createMandatoryParamsValidator()
      Validate that profile have not a missing mandatory parameter
      Returns:
    • createWrongFieldFormatValidator

      public ProfileValidator createWrongFieldFormatValidator()
      Set a default value if null
      Returns:
    • createCheckDuplicateInDatabaseValidator

      public ProfileValidator createCheckDuplicateInDatabaseValidator()
      Check if the profile identifier already exists in database
      Returns: