Interface NavigateAction<M extends java.util.Map<java.lang.String,​java.lang.Object>,​L extends java.util.List<java.lang.Object>>

  • Type Parameters:
    M - the map type that extends Map<String, Object>
    L - the list type that extends List<Object>
    All Known Subinterfaces:
    JSONNavigateAction
    All Known Implementing Classes:
    CopyPathsAction

    public interface NavigateAction<M extends java.util.Map<java.lang.String,​java.lang.Object>,​L extends java.util.List<java.lang.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
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void end()
      called after all navigation ends, and just before the navigation method exits
      boolean failFast​(java.lang.String path, java.lang.Exception e)
      called if navigation of a path throws an exception
      boolean failSilently​(java.lang.String path, java.lang.Exception e)
      called if navigation of a path throws an exception
      void foundLeafBeforePathEnd​(TreePath jp, java.lang.Object obj)
      reached leaf node (not a container) in source but specified path expects children - the specified path does not exist in the source
      void handleLeaf​(TreePath tp, int arrIndex, java.lang.Object arrItem)
      called when a leaf in a L is reached.
      void handleLeaf​(TreePath tp, java.lang.Object value)
      called when a leaf node is reached in a M.
      void pathEnd​(java.lang.String path)
      called after the navigation of a path ends
      boolean pathStart​(java.lang.String path)
      called before navigation of a new path starts
      void pathTailNotFound​(TreePath tp, java.lang.Object source)
      reached end of branch in source before end of specified path - the specified path does not exist in the source
      void recurEnd​(TreePath tp, L l)
      called when navigation of an NavigateAction type object ends
      void recurEnd​(TreePath tp, M m)
      called when navigation of an NavigateAction type object ends
      boolean recurInto​(TreePath tp, L sourceNode)
      called when an array node is encountered on the path
      boolean recurInto​(TreePath tp, M sourceNode)
      called when an object node is encountered on the path
      java.lang.Object result()
      holds the result of the navigation, as assigned by the action implementing this interface
      boolean start​(M objectToNavigate, java.util.Collection<java.lang.String> pathsToNavigate)
      called before any navigation of the NavigateAction starts
    • Method Detail

      • pathStart

        boolean pathStart​(java.lang.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,
                      java.util.Collection<java.lang.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,
                              java.lang.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​(java.lang.String path)
        called after the navigation of a path ends
        Parameters:
        path - TODO
      • failSilently

        boolean failSilently​(java.lang.String path,
                             java.lang.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​(java.lang.String path,
                         java.lang.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,
                                    java.lang.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,
                        java.lang.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,
                        java.lang.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

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