Class FlowNodeWrapper
java.lang.Object
io.jenkins.plugins.pipelinegraphview.utils.FlowNodeWrapper
- Author:
- Vivek Pandey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFlowNodeWrapper(org.jenkinsci.plugins.workflow.graph.FlowNode node, NodeRunStatus status, TimingInfo timingInfo, org.jenkinsci.plugins.workflow.job.WorkflowRun run) FlowNodeWrapper(org.jenkinsci.plugins.workflow.graph.FlowNode node, NodeRunStatus status, 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, TimingInfo timingInfo, org.jenkinsci.plugins.workflow.support.steps.input.InputStep inputStep, org.jenkinsci.plugins.workflow.job.WorkflowRun run, FlowNodeWrapper.NodeType type) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEdge(FlowNodeWrapper edge) voidaddEdges(List<FlowNodeWrapper> edges) voidaddParent(FlowNodeWrapper parent) voidaddParents(Collection<FlowNodeWrapper> parents) static intcompareIds(String ida, String idb) booleanReturns the human-readable reason an agent allocation under this stage is blocked (e.g.Extracts feature flags from ancestor hideFromView step nodes.getId()intorg.jenkinsci.plugins.workflow.support.steps.input.InputSteporg.jenkinsci.plugins.workflow.graph.FlowNodegetNode()static StringgetNodeGraphviz(List<FlowNodeWrapper> nodes) 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.WorkflowRungetRun()getType()inthashCode()static booleanisEnd(org.jenkinsci.plugins.workflow.graph.FlowNode node) static booleanisStart(org.jenkinsci.plugins.workflow.graph.FlowNode node) booleanisStep()booleanbooleanbooleanbooleanChecks to see if `this` and `that` probably represent the same underlying pipeline graph node as far as the user is concerned.voidremoveEdge(FlowNodeWrapper edge) voidremoveParent(FlowNodeWrapper parent) voidsetBlockErrorAction(org.jenkinsci.plugins.workflow.actions.ErrorAction blockErrorAction) voidsetCauseOfFailure(String causeOfFailure) voidsetPipelineActions(Collection<Action> pipelineActions) setType()static List<org.jenkinsci.plugins.workflow.graph.FlowNode> sortByFlowNodeId(Collection<org.jenkinsci.plugins.workflow.graph.FlowNode> nodes, boolean descending) Sortsnodesby the integer value of theirFlowNode.getId().toString()
-
Field Details
-
edges
-
type
-
-
Constructor Details
-
FlowNodeWrapper
public FlowNodeWrapper(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode node, @NonNull NodeRunStatus status, @NonNull 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 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 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 Details
-
probablySameNode
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 becausePipelineNodeGraphAdapteras 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
-
getLabelDisplayName
-
getCauseOfBlockage
Returns the human-readable reason an agent allocation under this stage is blocked (e.g. "Waiting for next available executor on 'linux'"), ornullif no agent step under this stage is currently queued.Checked even when
getStatus()doesn't reportBlueRun.BlueRunState.QUEUED: for declarative parallel branches, the chunked status computation can reportIN_PROGRESSwhile a childagent {...}block is actually queued. The presence of a non-null cause is the source of truth that the stage is queued. -
getStatus
-
getTiming
-
setTiming
-
getId
-
getIdAsInt
public int getIdAsInt() -
getNode
@NonNull public org.jenkinsci.plugins.workflow.graph.FlowNode getNode() -
getType
-
setType
-
addEdge
-
removeEdge
-
addEdges
-
addParent
-
addParents
-
removeParent
-
getFirstParent
-
getParents
-
getCauseOfFailure
-
setCauseOfFailure
-
equals
-
getInputStep
@CheckForNull public org.jenkinsci.plugins.workflow.support.steps.input.InputStep getInputStep() -
hashCode
public int hashCode() -
toString
-
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
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
Returns Action instances that were attached to the associated FlowNode, or to any of its children not represented in the graph. -
setPipelineActions
-
getArgumentsAsString
-
isSynthetic
public boolean isSynthetic() -
isUnhandledException
public boolean isUnhandledException() -
getFeatureFlags
Extracts feature flags from ancestor hideFromView step nodes.- Returns:
- Map of feature flag key-value pairs (currently only "hidden" is supported)
-
compareIds
-
sortByFlowNodeId
public static List<org.jenkinsci.plugins.workflow.graph.FlowNode> sortByFlowNodeId(Collection<org.jenkinsci.plugins.workflow.graph.FlowNode> nodes, boolean descending) Sortsnodesby the integer value of theirFlowNode.getId(). Parses each ID exactly once via decorate-sort-undecorate. -
getNodeGraphviz
-