Class UnitMetadataMatcher

java.lang.Object
fr.gouv.vitam.common.model.collect.UnitMetadataMatcher

public final class UnitMetadataMatcher extends Object
Matches an archive unit metadata against a dotted path and an expected value. Shared by every collect upload path so that a dynamic attachment rule behaves identically whatever the source of the metadata.
  • Method Details

    • matches

      public static boolean matches(com.fasterxml.jackson.databind.JsonNode unitMetadata, String metadataPath, String expectedValue)
      Parameters:
      unitMetadata - the metadata to inspect
      metadataPath - a dotted path, an empty path meaning the node itself
      expectedValue - the value the resolved node must hold
      Returns:
      true when at least one node resolved by the path equals the expected value