Package fr.gouv.vitam.common.database.utils

# Class MetadataDocumentHelper

java.lang.Object
fr.gouv.vitam.common.database.utils.MetadataDocumentHelper

public class MetadataDocumentHelper extends Object
Helper class for metadata documents fields (units & object groups).

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `STORAGE_KEY`
  `static final String`
  `STRATEGY_KEY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MetadataDocumentHelper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static List<String>`
  `getComputedGraphObjectGroupFields()`
  `static List<String>`
  `getComputedGraphUnitFields()`
  `static Set<String>`
  `getComputedObjectGroupFields()`
  `static Set<String>`
  `getComputedUnitFields()`
  `static Set<String>`
  `getSecuredObjectGroupFields()`
  Retrieve main / secured object group fields
  `static Set<String>`
  `getSecuredUnitFields()`
  Retrieve main / secured unit fields
  `static String`
  `getStrategyIdFromRawUnitOrGot(com.fasterxml.jackson.databind.JsonNode documentJson)`
  Retrieve the strategyId from a raw unit or got json
  `static String`
  `getStrategyIdFromUnit(com.fasterxml.jackson.databind.JsonNode unitJson)`
  Retrieve the strategyId from a unit json
  `static Set<String>`
  `getTemporaryUnitFields()`
  `static void`
  `removeComputedFieldsFromObjectGroup(com.fasterxml.jackson.databind.JsonNode objectGroupJson)`
  Removes computed graph fields from got json
  `static void`
  `removeComputedFieldsFromUnit(com.fasterxml.jackson.databind.JsonNode unitJson)`
  Removes computed fields (graph, elimination indexation...

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

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

- ## Field Details

  - ### STORAGE_KEY

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

  - ### STRATEGY_KEY

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

- ## Constructor Details

  - ### MetadataDocumentHelper

    public MetadataDocumentHelper()

- ## Method Details

  - ### getComputedGraphUnitFields

    public static List<String> getComputedGraphUnitFields()
    Returns:
      the list of computed graph unit fields

  - ### getComputedGraphObjectGroupFields

    public static List<String> getComputedGraphObjectGroupFields()
    Returns:
      the list of computed graph object group fields

  - ### getTemporaryUnitFields

    public static Set<String> getTemporaryUnitFields()
    Returns:
      the list of temporary unit fields

  - ### getComputedUnitFields

    public static Set<String> getComputedUnitFields()
    Returns:
      the list of all unit computed fields (computed graph fields + temporary fields)

  - ### getComputedObjectGroupFields

    public static Set<String> getComputedObjectGroupFields()
    Returns:
      the list of all object group computed fields (computed graph fields + temporary fields)

  - ### removeComputedFieldsFromUnit

    public static void removeComputedFieldsFromUnit(com.fasterxml.jackson.databind.JsonNode unitJson)
    Removes computed fields (graph, elimination indexation... ) from unit json
    Parameters:
      `unitJson` -

  - ### removeComputedFieldsFromObjectGroup

    public static void removeComputedFieldsFromObjectGroup(com.fasterxml.jackson.databind.JsonNode objectGroupJson)
    Removes computed graph fields from got json
    Parameters:
      `objectGroupJson` -

  - ### getStrategyIdFromRawUnitOrGot

    public static String getStrategyIdFromRawUnitOrGot(com.fasterxml.jackson.databind.JsonNode documentJson)
    Retrieve the strategyId from a raw unit or got json
    Parameters:
      `documentJson` - unit or got json
    Returns:
      strategyId

  - ### getStrategyIdFromUnit

    public static String getStrategyIdFromUnit(com.fasterxml.jackson.databind.JsonNode unitJson)
    Retrieve the strategyId from a unit json
    Parameters:
      `unitJson` - unit json
    Returns:
      strategyId

  - ### getSecuredUnitFields

    public static Set<String> getSecuredUnitFields()
    Retrieve main / secured unit fields

  - ### getSecuredObjectGroupFields

    public static Set<String> getSecuredObjectGroupFields()
    Retrieve main / secured object group fields