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

# Class SchemaCommonService

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

public class SchemaCommonService extends Object
This Common service for managing schema

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `SCHEMA_COLLECTION`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SchemaCommonService()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static com.fasterxml.jackson.databind.JsonNode`
  `buildDslQueryForExtractingSchema(Set<Integer> tenantIds, List<String> schemaPaths)`
  `static com.fasterxml.jackson.databind.JsonNode`
  `buildOntologyQueryDslByIdentifiers(Set<String> ontologyIdentifiers)`
  Build dsl query from ontology identifiers
  `static String`
  `extractLeafFromPath(String schemaPath)`
  `static SchemaImportReport`
  `fillSchemaImportReportError(SchemaImportReport schemaImportReport, Set<String> errorPathList, StatusCode status, GUID eip)`
  generate Error Report
  `static SchemaImportReport`
  `fillSchemaImportReportOK(SchemaImportReport schemaImportReport, List<Schema> schemaList, GUID eip)`
  generate Ok Report
  `static VitamError`
  `getVitamError(String vitamCode, String error, StatusCode statusCode)`
  `static SchemaImportReport`
  `initSchemaImportReport(GUID eip)`
  `static List<Schema>`
  `mapSchemaFromInputParameters(List<SchemaInputModel> externalSchemaInputList, Map<String,OntologyModel> ontologyEltsMapByIdentifier)`
  Map Schema intput to db entity

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

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

- ## Field Details

  - ### SCHEMA_COLLECTION

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

- ## Constructor Details

  - ### SchemaCommonService

    public SchemaCommonService()

- ## Method Details

  - ### buildDslQueryForExtractingSchema

    public static com.fasterxml.jackson.databind.JsonNode buildDslQueryForExtractingSchema(Set<Integer> tenantIds, List<String> schemaPaths) throws InvalidCreateOperationException
    Throws:
      `InvalidCreateOperationException`

  - ### extractLeafFromPath

    public static String extractLeafFromPath(String schemaPath)

  - ### mapSchemaFromInputParameters

    public static List<Schema> mapSchemaFromInputParameters(List<SchemaInputModel> externalSchemaInputList, Map<String,OntologyModel> ontologyEltsMapByIdentifier)
    Map Schema intput to db entity

  - ### getVitamError

    public static VitamError getVitamError(String vitamCode, String error, StatusCode statusCode)

  - ### fillSchemaImportReportOK

    public static SchemaImportReport fillSchemaImportReportOK(SchemaImportReport schemaImportReport, List<Schema> schemaList, GUID eip)
    generate Ok Report
    Parameters:
      `schemaList` - the list of created schema
    Returns:
      the error report inputStream

  - ### fillSchemaImportReportError

    public static SchemaImportReport fillSchemaImportReportError(SchemaImportReport schemaImportReport, Set<String> errorPathList, StatusCode status, GUID eip)
    generate Error Report
    Parameters:
      `errorPathList` - the list of created schema
    Returns:
      the error report inputStream

  - ### initSchemaImportReport

    public static SchemaImportReport initSchemaImportReport(GUID eip)

  - ### buildOntologyQueryDslByIdentifiers

    public static com.fasterxml.jackson.databind.JsonNode buildOntologyQueryDslByIdentifiers(Set<String> ontologyIdentifiers) throws InvalidCreateOperationException
    Build dsl query from ontology identifiers
    Parameters:
      `ontologyIdentifiers` -
    Returns:
    Throws:
      `InvalidCreateOperationException`