Interface ConfigurationTransformation.Versioned

All Superinterfaces:
ConfigurationTransformation
All Known Implementing Classes:
DataFixerTransformation, DataFixerTransformation
Enclosing interface:
ConfigurationTransformation

A transformation that is aware of node versions.
Since:
4.0.0
  • Field Details

    • VERSION_UNKNOWN

      static final int VERSION_UNKNOWN
      Indicates a node with an unknown version.

      This can be returned as the latest version.

      Since:
      4.0.0
      See Also:
  • Method Details

    • versionKey

      Get the path the node's current version is located at.
      Returns:
      version path
      Since:
      4.0.0
    • latestVersion

      Get the latest version that nodes can be updated to.
      Returns:
      the most recent version
      Since:
      4.0.0
    • version

      default int version(ConfigurationNode node)
      Get the version of a node hierarchy.

      Note that the node checked here must be the same node passed to ConfigurationTransformation.apply(ConfigurationNode), not any node in a hierarchy.

      If the node value is not present or not coercible to an integer, VERSION_UNKNOWN will be returned. When the transformation is executed, every version transformation will be applied.

      Parameters:
      node - node to check
      Returns:
      version, or VERSION_UNKNOWN if no value is present
      Since:
      4.0.0