Interface StructureHelper


public interface StructureHelper
Callback interface to be used with InterpretedContainer to allow instances to redefine roots.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Override if the passed container should be considered as Container.isRoot true.
    boolean
    Determine if the path passed is supposed to exist.
  • Method Details

    • isRoot

      boolean isRoot(ArtifactContainer e)
      Override if the passed container should be considered as Container.isRoot true.

      THIS CANNOT MAKE THE CONTAINER RETURN isRoot=false

      if the behavior is required to override root containers to act as non-roots, a new story is required

      Parameters:
      e - the container to evaluate.
      Returns:
      true if the container.isRoot response should be overridden to be true. false means no override takes place.
    • isValid

      boolean isValid(ArtifactContainer e, String path)
      Determine if the path passed is supposed to exist.

      When the StructureHelper converts containers to be isRoot true, it must also be responsible for stating that all paths beneath that container should no longer be valid.

      Parameters:
      e - the container for the path to evaluate
      path - the path to evaluate in the Container
      Returns:
      true if the path corresponds to an Entry that is still part of Container, false otherwise.