public class ProfileManager extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static String | RNG_GRAMMAR | 
| static String | XSD_SCHEMA | 
| Constructor and Description | 
|---|
| ProfileManager(LogbookOperationsClient logbookClient,
              GUID eip) | 
| Modifier and Type | Method and Description | 
|---|---|
| ProfileValidator | checkDuplicateInIdentifierSlaveModeValidator()Check if the Id of the  contract  already exists in database | 
| ProfileValidator | createCheckDuplicateInDatabaseValidator()Check if the profile identifier already exists in database | 
| ProfileValidator | createMandatoryParamsValidator()Validate that profile have not a missing mandatory parameter | 
| ProfileValidator | createWrongFieldFormatValidator()Set a default value if null | 
| 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)Log validation error (business error) | 
| boolean | validateProfile(ProfileModel profile,
               VitamError error) | 
| boolean | validateProfileFile(ProfileModel profileModel,
                   byte[] byteArray,
                   VitamError error)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 | 
| boolean | validateRNG(InputStream inputStream,
           VitamError error)TODO
 1. | 
| boolean | validateXSD(InputStream inputStream,
           VitamError error)Just check if inputStream is xml valid | 
public static final String RNG_GRAMMAR
public static final String XSD_SCHEMA
public ProfileManager(LogbookOperationsClient logbookClient, GUID eip)
public boolean validateProfile(ProfileModel profile, VitamError error)
public boolean validateProfileFile(ProfileModel profileModel, byte[] byteArray, VitamError error)
profileModel - byteArray - error - public boolean validateXSD(InputStream inputStream, VitamError error)
inputStream - error - public boolean validateRNG(InputStream inputStream, VitamError error)
inputStream - error - public void logValidationError(String eventType, String objectId, String errorsDetails) throws VitamException
errorsDetails - VitamExceptionpublic void logFatalError(String eventType, String objectId, String errorsDetails) throws VitamException
errorsDetails - VitamExceptionpublic void logStarted(String eventType, String objectId) throws VitamException
VitamExceptionpublic void logSuccess(String eventType, String objectId, String message) throws VitamException
VitamExceptionpublic ProfileValidator createMandatoryParamsValidator()
public ProfileValidator createWrongFieldFormatValidator()
public ProfileValidator checkDuplicateInIdentifierSlaveModeValidator()
public ProfileValidator createCheckDuplicateInDatabaseValidator()
Copyright © 2018 Vitam. All rights reserved.