Class FlowNodeWrapper
- java.lang.Object
-
- io.jenkins.plugins.pipelinegraphview.utils.FlowNodeWrapper
-
public class FlowNodeWrapper extends Object
- Author:
- Vivek Pandey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FlowNodeWrapper.FlowNodeComparator
static class
FlowNodeWrapper.NodeComparator
static class
FlowNodeWrapper.NodeIdComparator
static class
FlowNodeWrapper.NodeType
-
Field Summary
Fields Modifier and Type Field Description List<FlowNodeWrapper>
edges
FlowNodeWrapper.NodeType
type
-
Constructor Summary
Constructors Constructor Description FlowNodeWrapper(org.jenkinsci.plugins.workflow.graph.FlowNode node, NodeRunStatus status, org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo timingInfo, org.jenkinsci.plugins.workflow.job.WorkflowRun run)
FlowNodeWrapper(org.jenkinsci.plugins.workflow.graph.FlowNode node, NodeRunStatus status, org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo timingInfo, org.jenkinsci.plugins.workflow.support.steps.input.InputStep inputStep, org.jenkinsci.plugins.workflow.job.WorkflowRun run)
FlowNodeWrapper(org.jenkinsci.plugins.workflow.graph.FlowNode node, NodeRunStatus status, org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo timingInfo, org.jenkinsci.plugins.workflow.support.steps.input.InputStep inputStep, org.jenkinsci.plugins.workflow.job.WorkflowRun run, FlowNodeWrapper.NodeType type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEdge(FlowNodeWrapper edge)
void
addEdges(List<FlowNodeWrapper> edges)
void
addParent(FlowNodeWrapper parent)
void
addParents(Collection<FlowNodeWrapper> parents)
static int
compareIds(String ida, String idb)
boolean
equals(Object obj)
String
getArgumentsAsString()
String
getCauseOfFailure()
String
getDisplayName()
FlowNodeWrapper
getFirstParent()
String
getId()
org.jenkinsci.plugins.workflow.support.steps.input.InputStep
getInputStep()
String
getLabelDisplayName()
org.jenkinsci.plugins.workflow.graph.FlowNode
getNode()
static String
getNodeGraphviz(List<FlowNodeWrapper> nodes)
List<FlowNodeWrapper>
getParents()
Collection<Action>
getPipelineActions()
Returns Action instances that were attached to the associated FlowNode, or to any of its children not represented in the graph.<T extends Action>
Collection<T>getPipelineActions(Class<T> clazz)
Returns Action instances that were attached to the associated FlowNode, or to any of its children not represented in the graph.org.jenkinsci.plugins.workflow.job.WorkflowRun
getRun()
NodeRunStatus
getStatus()
org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo
getTiming()
FlowNodeWrapper.NodeType
getType()
int
hashCode()
static boolean
isEnd(org.jenkinsci.plugins.workflow.graph.FlowNode node)
static boolean
isStart(org.jenkinsci.plugins.workflow.graph.FlowNode node)
boolean
isStep()
boolean
isStepsBlock()
boolean
isSynthetic()
boolean
isUnhandledException()
String
nodeError()
boolean
probablySameNode(FlowNodeWrapper that)
Checks to see if `this` and `that` probably represent the same underlying pipeline graph node as far as the user is concerned.void
removeEdge(FlowNodeWrapper edge)
void
removeParent(FlowNodeWrapper parent)
void
setBlockErrorAction(org.jenkinsci.plugins.workflow.actions.ErrorAction blockErrorAction)
void
setCauseOfFailure(String causeOfFailure)
void
setPipelineActions(Collection<Action> pipelineActions)
org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo
setTiming()
FlowNodeWrapper.NodeType
setType()
String
toString()
-
-
-
Field Detail
-
edges
public final List<FlowNodeWrapper> edges
-
type
public final FlowNodeWrapper.NodeType type
-
-
Constructor Detail
-
FlowNodeWrapper
public FlowNodeWrapper(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode node, @NonNull NodeRunStatus status, @NonNull org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo timingInfo, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run)
-
FlowNodeWrapper
public FlowNodeWrapper(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode node, @NonNull NodeRunStatus status, @NonNull org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo timingInfo, @Nullable org.jenkinsci.plugins.workflow.support.steps.input.InputStep inputStep, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run)
-
FlowNodeWrapper
public FlowNodeWrapper(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode node, @NonNull NodeRunStatus status, @NonNull org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo timingInfo, @Nullable org.jenkinsci.plugins.workflow.support.steps.input.InputStep inputStep, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run, @Nullable FlowNodeWrapper.NodeType type)
-
-
Method Detail
-
probablySameNode
public boolean probablySameNode(@Nullable FlowNodeWrapper that)
Checks to see if `this` and `that` probably represent the same underlying pipeline graph node as far as the user is concerned. This is sloppier than an exact name and ID match becausePipelineNodeGraphAdapter
as of 2019-05-17 can return some nodes with different IDs during a build as opposed to once the build is complete. As such we check name, type, and firstParent. But we need to check firstParent the same way for the same reason.- Parameters:
that
-- Returns:
-
getRun
public org.jenkinsci.plugins.workflow.job.WorkflowRun getRun()
-
getDisplayName
@NonNull public String getDisplayName()
-
getLabelDisplayName
@CheckForNull public String getLabelDisplayName()
-
getStatus
@NonNull public NodeRunStatus getStatus()
-
getTiming
@NonNull public org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo getTiming()
-
setTiming
@NonNull public org.jenkinsci.plugins.workflow.pipelinegraphanalysis.TimingInfo setTiming()
-
getId
@NonNull public String getId()
-
getNode
@NonNull public org.jenkinsci.plugins.workflow.graph.FlowNode getNode()
-
getType
public FlowNodeWrapper.NodeType getType()
-
setType
public FlowNodeWrapper.NodeType setType()
-
addEdge
public void addEdge(FlowNodeWrapper edge)
-
removeEdge
public void removeEdge(FlowNodeWrapper edge)
-
addEdges
public void addEdges(List<FlowNodeWrapper> edges)
-
addParent
public void addParent(FlowNodeWrapper parent)
-
addParents
public void addParents(Collection<FlowNodeWrapper> parents)
-
removeParent
public void removeParent(FlowNodeWrapper parent)
-
getFirstParent
@CheckForNull public FlowNodeWrapper getFirstParent()
-
getParents
@NonNull public List<FlowNodeWrapper> getParents()
-
getCauseOfFailure
public String getCauseOfFailure()
-
setCauseOfFailure
public void setCauseOfFailure(String causeOfFailure)
-
getInputStep
@CheckForNull public org.jenkinsci.plugins.workflow.support.steps.input.InputStep getInputStep()
-
nodeError
@CheckForNull public String nodeError()
-
setBlockErrorAction
public void setBlockErrorAction(org.jenkinsci.plugins.workflow.actions.ErrorAction blockErrorAction)
-
isStart
public static boolean isStart(org.jenkinsci.plugins.workflow.graph.FlowNode node)
-
isEnd
public static boolean isEnd(org.jenkinsci.plugins.workflow.graph.FlowNode node)
-
isStep
public boolean isStep()
-
isStepsBlock
public boolean isStepsBlock()
-
getPipelineActions
public <T extends Action> Collection<T> getPipelineActions(Class<T> clazz)
Returns Action instances that were attached to the associated FlowNode, or to any of its children not represented in the graph. Filters by class to mimic Item.getActions(class).
-
getPipelineActions
public Collection<Action> getPipelineActions()
Returns Action instances that were attached to the associated FlowNode, or to any of its children not represented in the graph.
-
setPipelineActions
public void setPipelineActions(Collection<Action> pipelineActions)
-
getArgumentsAsString
public String getArgumentsAsString()
-
isSynthetic
public boolean isSynthetic()
-
isUnhandledException
public boolean isUnhandledException()
-
getNodeGraphviz
public static String getNodeGraphviz(List<FlowNodeWrapper> nodes)
-
-