Package com.axelor.workflow.migrate
Record Class MigrationTargets
java.lang.Object
java.lang.Record
com.axelor.workflow.migrate.MigrationTargets
- Record Components:
nodes- the parkable nodes of the target plan this position may move to, in graph ordercanCancel- whether Cancel is offered; always truecanEnd- whether the syntheticEndtarget is offered; never on a branchcancelEndsWholeRun- true on a branch, where cancelling takes down the fork and its siblingsblockedReason- whynodesis empty, or null
public record MigrationTargets(List<MigrationTargets.TargetNode> nodes, boolean canCancel, boolean canEnd, boolean cancelEndsWholeRun, String blockedReason)
extends Record
Where one position may go on a chosen revision, and what else may be done to it. Apply re-checks
requests against the same code.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA node a position may be moved onto. -
Constructor Summary
ConstructorsConstructorDescriptionMigrationTargets(List<MigrationTargets.TargetNode> nodes, boolean canCancel, boolean canEnd, boolean cancelEndsWholeRun, String blockedReason) Creates an instance of aMigrationTargetsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockedReasonrecord component.booleanReturns the value of thecanCancelrecord component.booleanReturns the value of thecancelEndsWholeRunrecord component.booleancanEnd()Returns the value of thecanEndrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.nodes()Returns the value of thenodesrecord component.static MigrationTargetsof(ParkedPosition position, WorkflowPlan target) The targetspositionhas ontarget.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MigrationTargets
public MigrationTargets(List<MigrationTargets.TargetNode> nodes, boolean canCancel, boolean canEnd, boolean cancelEndsWholeRun, String blockedReason) Creates an instance of aMigrationTargetsrecord class.- Parameters:
nodes- the value for thenodesrecord componentcanCancel- the value for thecanCancelrecord componentcanEnd- the value for thecanEndrecord componentcancelEndsWholeRun- the value for thecancelEndsWholeRunrecord componentblockedReason- the value for theblockedReasonrecord component
-
-
Method Details
-
of
The targetspositionhas ontarget.- Parameters:
target- the chosen revision's plan, or null when it does not compile, which offers no targets
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
nodes
Returns the value of thenodesrecord component.- Returns:
- the value of the
nodesrecord component
-
canCancel
public boolean canCancel()Returns the value of thecanCancelrecord component.- Returns:
- the value of the
canCancelrecord component
-
canEnd
public boolean canEnd()Returns the value of thecanEndrecord component.- Returns:
- the value of the
canEndrecord component
-
cancelEndsWholeRun
public boolean cancelEndsWholeRun()Returns the value of thecancelEndsWholeRunrecord component.- Returns:
- the value of the
cancelEndsWholeRunrecord component
-
blockedReason
Returns the value of theblockedReasonrecord component.- Returns:
- the value of the
blockedReasonrecord component
-