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

# Class SchemaValidationService

java.lang.Object
fr.gouv.vitam.functional.administration.core.schema.SchemaValidationService

public class SchemaValidationService extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SchemaValidationService(MongoDbAccessReferential mongoDbAccessReferential, LogbookOperationsClientFactory logbookOperationsClientFactory)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addError(String path, ErrorReportSchema error, Map<String,List<ErrorReportSchema>> errors)`
  `void`
  `logError(GUID operationGuid, String eventType, String objectId, String errorsDetails)`
  `void`
  `logSuccessLogBook(GUID operationGuid, String eventType)`
  `void`
  `logValidationError(GUID operationGuid, String eventType, String errorsDetails)`
  Log validation error (business error)
  `void`
  `startLogBook(GUID operationGuid, String eventType)`
  `void`
  `validateExternalSchemaInputs(List<SchemaInputModel> externalSchemaInputList, List<SchemaResponse> currentUnitSchemaList, Map<String,OntologyModel> ontologyEltsMapByIdentifier, Map<String,List<ErrorReportSchema>> importErrors)`
  Validate input schema list coherence

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

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

- ## Constructor Details

  - ### SchemaValidationService

    public SchemaValidationService(MongoDbAccessReferential mongoDbAccessReferential, LogbookOperationsClientFactory logbookOperationsClientFactory)

- ## Method Details

  - ### validateExternalSchemaInputs

    public void validateExternalSchemaInputs(List<SchemaInputModel> externalSchemaInputList, List<SchemaResponse> currentUnitSchemaList, Map<String,OntologyModel> ontologyEltsMapByIdentifier, Map<String,List<ErrorReportSchema>> importErrors) throws VitamException, InvalidCreateOperationException
    Validate input schema list coherence
    Parameters:
      `externalSchemaInputList` -
      `currentUnitSchemaList` -
      `ontologyEltsMapByIdentifier` -
    Throws:
      `VitamException`
      `InvalidCreateOperationException`

  - ### logValidationError

    public void logValidationError(GUID operationGuid, String eventType, String errorsDetails) throws VitamException
    Log validation error (business error)
    Parameters:
      `errorsDetails` -
    Throws:
      `VitamException`

  - ### startLogBook

    public void startLogBook(GUID operationGuid, String eventType) throws LogbookClientBadRequestException, LogbookClientAlreadyExistsException, LogbookClientServerException
    Throws:
      `LogbookClientBadRequestException`
      `LogbookClientAlreadyExistsException`
      `LogbookClientServerException`

  - ### logError

    public void logError(GUID operationGuid, String eventType, String objectId, String errorsDetails) throws VitamException
    Throws:
      `VitamException`

  - ### logSuccessLogBook

    public void logSuccessLogBook(GUID operationGuid, String eventType) throws VitamException
    Throws:
      `VitamException`

  - ### addError

    public void addError(String path, ErrorReportSchema error, Map<String,List<ErrorReportSchema>> errors)