Class SchemaCommonService
- java.lang.Object
-
- fr.gouv.vitam.functional.administration.core.schema.SchemaCommonService
-
public class SchemaCommonService extends java.lang.Object
This Common service for managing schema
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SCHEMA_COLLECTION
-
Constructor Summary
Constructors Constructor Description SchemaCommonService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.JsonNode
buildDslQueryForExtractingSchema(java.util.Set<java.lang.Integer> tenantIds, java.util.List<java.lang.String> schemaPaths)
static com.fasterxml.jackson.databind.JsonNode
buildOntologyQueryDslByIdentifiers(java.util.Set<java.lang.String> ontologyIdentifiers)
Build dsl query from ontology identifiersstatic java.lang.String
extractLeafFromPath(java.lang.String schemaPath)
static SchemaImportReport
fillSchemaImportReportError(SchemaImportReport schemaImportReport, java.util.Set<java.lang.String> errorPathList, StatusCode status, GUID eip)
generate Error Reportstatic SchemaImportReport
fillSchemaImportReportOK(SchemaImportReport schemaImportReport, java.util.List<Schema> schemaList, GUID eip)
generate Ok Reportstatic VitamError
getVitamError(java.lang.String vitamCode, java.lang.String error, StatusCode statusCode)
static SchemaImportReport
initSchemaImportReport(GUID eip)
static java.util.List<Schema>
mapSchemaFromInputParameters(java.util.List<SchemaInputModel> externalSchemaInputList, java.util.Map<java.lang.String,OntologyModel> ontologyEltsMapByIdentifier)
Map Schema intput to db entity
-
-
-
Field Detail
-
SCHEMA_COLLECTION
public static final java.lang.String SCHEMA_COLLECTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildDslQueryForExtractingSchema
public static com.fasterxml.jackson.databind.JsonNode buildDslQueryForExtractingSchema(java.util.Set<java.lang.Integer> tenantIds, java.util.List<java.lang.String> schemaPaths) throws InvalidCreateOperationException
- Throws:
InvalidCreateOperationException
-
extractLeafFromPath
public static java.lang.String extractLeafFromPath(java.lang.String schemaPath)
-
mapSchemaFromInputParameters
public static java.util.List<Schema> mapSchemaFromInputParameters(java.util.List<SchemaInputModel> externalSchemaInputList, java.util.Map<java.lang.String,OntologyModel> ontologyEltsMapByIdentifier)
Map Schema intput to db entity
-
getVitamError
public static VitamError getVitamError(java.lang.String vitamCode, java.lang.String error, StatusCode statusCode)
-
fillSchemaImportReportOK
public static SchemaImportReport fillSchemaImportReportOK(SchemaImportReport schemaImportReport, java.util.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, java.util.Set<java.lang.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(java.util.Set<java.lang.String> ontologyIdentifiers) throws InvalidCreateOperationException
Build dsl query from ontology identifiers- Parameters:
ontologyIdentifiers
-- Returns:
- Throws:
InvalidCreateOperationException
-
-