Interface NavigateAction<M extends Map<String,Object>,L extends List<Object>>

All Known Subinterfaces:
JSONNavigateAction
All Known Implementing Classes:
CopyPathsAction

public interface NavigateAction<M extends Map<String,Object>,L extends List<Object>>
An interface for a processing action on the nodes of a NavigateAction while navigating its branches.

See package-info for more details

Since:
15 June 2016
Author:
adoneitan@gmail.com
  • Method Details

    • pathStart

      boolean pathStart(String path)
      called before navigation of a new path starts
      Parameters:
      path - TODO
      Returns:
      true if the specified path should be navigated
    • start

      boolean start(M objectToNavigate, Collection<String> pathsToNavigate)
      called before any navigation of the NavigateAction starts
      Parameters:
      objectToNavigate - TODO
      pathsToNavigate - TODO
      Returns:
      true if navigation should start at all
    • pathTailNotFound

      void pathTailNotFound(TreePath tp, Object source)
      reached end of branch in source before end of specified path - the specified path does not exist in the source
      Parameters:
      tp - TODO
      source - TODO
    • pathEnd

      void pathEnd(String path)
      called after the navigation of a path ends
      Parameters:
      path - TODO
    • failSilently

      boolean failSilently(String path, Exception e)
      called if navigation of a path throws an exception
      Parameters:
      path - TODO
      e - TODO
      Returns:
      true if the failure on this path should not abort the rest of the navigation
    • failFast

      boolean failFast(String path, Exception e)
      called if navigation of a path throws an exception
      Parameters:
      path - TODO
      e - TODO
      Returns:
      true if the failure on this path should abort the rest of the navigation
    • recurInto

      boolean recurInto(TreePath tp, M sourceNode)
      called when an object node is encountered on the path
      Parameters:
      tp - TODO
      sourceNode - TODO
      Returns:
      true if the navigator should navigate into the object
    • recurInto

      boolean recurInto(TreePath tp, L sourceNode)
      called when an array node is encountered on the path
      Parameters:
      tp - TODO
      sourceNode - TODO
      Returns:
      true if the navigator should navigate into the array
    • foundLeafBeforePathEnd

      void foundLeafBeforePathEnd(TreePath jp, Object obj)
      reached leaf node (not a container) in source but specified path expects children - the specified path does not exist in the source
      Parameters:
      jp - TODO
      obj - TODO
    • handleLeaf

      void handleLeaf(TreePath tp, Object value)
      called when a leaf node is reached in a M. a leaf in a M is a key-value pair where the value is not a container itself (it is not a M nor a L)
      Parameters:
      tp - - the JsonPath pointing to the leaf
      value - TODO
    • handleLeaf

      void handleLeaf(TreePath tp, int arrIndex, Object arrItem)
      called when a leaf in a L is reached. a leaf in a L is a non-container item (it is not a M nor a L)
      Parameters:
      tp - -
      arrIndex - -
      arrItem - - the item
    • recurEnd

      void recurEnd(TreePath tp, M m)
      called when navigation of an NavigateAction type object ends
      Parameters:
      tp - the path pointing to the object
      m - TODO
    • recurEnd

      void recurEnd(TreePath tp, L l)
      called when navigation of an NavigateAction type object ends
      Parameters:
      tp - the path pointing to the object
      l - TODO
    • end

      void end()
      called after all navigation ends, and just before the navigation method exits
    • result

      Object result()
      holds the result of the navigation, as assigned by the action implementing this interface
      Returns:
      - result