@groovy.transform.Trait trait RoutingTrait extends java.lang.Object
Defines the common behavior for all routings (e.g. MasterRouting, a Product and Order routing). A routing is a sequence of steps (operations) needed to manufacture a product. These steps operations can be simple actions such as ASSEMBLE or TEST. They may also be a composite operation that is made up of several actions.
This trait actually contains the core routing logic and elements such as operations. The implementers of this class are used to attach a routing to a product in different ways.Type | Name and description |
---|---|
java.util.List<OperationTrait> |
operations |
Constructor and description |
---|
RoutingTrait
() |
Type Params | Return Type | Name and description |
---|---|---|
|
int |
determineNextOperation(int sequence) Determines the next operation to be performed after the given operation is completed. |
|
java.util.List<OperationTrait> |
getOperations() Gets the operations. |
|
void |
setOperations(java.util.List<OperationTrait> operations) Sets the operations. |
|
java.lang.Object |
sortOperations() Sorts the list of operations. |
|
java.util.List<ValidationError> |
validateOperations(java.lang.String routing) Validates that the operations are valid (no duplicate sequences and has at least one operation). |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Determines the next operation to be performed after the given operation is completed.
sequence
- The operation sequence to find the next operation for.Gets the operations.
Sets the operations.
operations
- The operations.Sorts the list of operations. Typically used in the beforeSave() method.
Validates that the operations are valid (no duplicate sequences and has at least one operation).
routing
- The routing the operations are on (used only for error messages).