Class FlowNodeUtil

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void cacheRun​(org.jenkinsci.plugins.workflow.job.WorkflowRun run, RunExt runExt)  
      static void dumpNodes​(List<org.jenkinsci.plugins.workflow.graph.FlowNode> nodeList)
      Simple debug utility for dumping a node list to sysout.
      static RunExt getCachedRun​(org.jenkinsci.plugins.workflow.job.WorkflowRun run)  
      static org.jenkinsci.plugins.workflow.graph.FlowNode getNodeAfter​(org.jenkinsci.plugins.workflow.graph.FlowNode node)
      Find a node following this one, using an optimized approach
      static List<org.jenkinsci.plugins.workflow.graph.FlowNode> getStageNodes​(org.jenkinsci.plugins.workflow.flow.FlowExecution execution)
      List the stage nodes for a FlowExecution -- needed for back-compat.
      static List<org.jenkinsci.plugins.workflow.graph.FlowNode> getStageNodes​(org.jenkinsci.plugins.workflow.graph.FlowNode stageNode)
      Needed for back-compat, returns nodes inside a stage Note: far more efficient than existing implementation because it uses the cache of run info.
      static StatusExt getStatus​(org.jenkinsci.plugins.workflow.graph.FlowNode node)  
      static org.jenkinsci.plugins.workflow.job.WorkflowRun getWorkflowRunForExecution​(org.jenkinsci.plugins.workflow.flow.FlowExecution exec)  
      static boolean isNotPartOfRunningBuild​(org.jenkinsci.plugins.workflow.flow.FlowExecution execution)  
      static boolean isPauseNode​(org.jenkinsci.plugins.workflow.graph.FlowNode flowNode)
      Is the supplied node causing the workflow to pause at that point.
    • Method Detail

      • getCachedRun

        @CheckForNull
        public static RunExt getCachedRun​(@NonNull
                                          org.jenkinsci.plugins.workflow.job.WorkflowRun run)
      • cacheRun

        public static void cacheRun​(org.jenkinsci.plugins.workflow.job.WorkflowRun run,
                                    RunExt runExt)
      • isNotPartOfRunningBuild

        public static boolean isNotPartOfRunningBuild​(org.jenkinsci.plugins.workflow.flow.FlowExecution execution)
      • getNodeAfter

        @CheckForNull
        public static org.jenkinsci.plugins.workflow.graph.FlowNode getNodeAfter​(@NonNull
                                                                                 org.jenkinsci.plugins.workflow.graph.FlowNode node)
        Find a node following this one, using an optimized approach
      • isPauseNode

        public static boolean isPauseNode​(org.jenkinsci.plugins.workflow.graph.FlowNode flowNode)
        Is the supplied node causing the workflow to pause at that point.
        Parameters:
        flowNode - The node.
        Returns:
        True if the node is causing the workflow to pause, otherwise false.
      • getStatus

        public static StatusExt getStatus​(org.jenkinsci.plugins.workflow.graph.FlowNode node)
      • getWorkflowRunForExecution

        @CheckForNull
        public static org.jenkinsci.plugins.workflow.job.WorkflowRun getWorkflowRunForExecution​(@CheckForNull
                                                                                                org.jenkinsci.plugins.workflow.flow.FlowExecution exec)
      • getStageNodes

        @NonNull
        public static List<org.jenkinsci.plugins.workflow.graph.FlowNode> getStageNodes​(@CheckForNull
                                                                                        org.jenkinsci.plugins.workflow.flow.FlowExecution execution)
                                                                                 throws RuntimeException
        List the stage nodes for a FlowExecution -- needed for back-compat. Note: far more efficient than existing implementation because it uses the cache of run info.
        Throws:
        RuntimeException
      • getStageNodes

        @NonNull
        public static List<org.jenkinsci.plugins.workflow.graph.FlowNode> getStageNodes​(@CheckForNull
                                                                                        org.jenkinsci.plugins.workflow.graph.FlowNode stageNode)
        Needed for back-compat, returns nodes inside a stage Note: far more efficient than existing implementation because it uses the cache of run info.
      • dumpNodes

        public static void dumpNodes​(List<org.jenkinsci.plugins.workflow.graph.FlowNode> nodeList)
        Simple debug utility for dumping a node list to sysout.
        Parameters:
        nodeList - The list to dump.