public class StatusTransitionUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static Collection<CableStatus> |
possibleStatuses(CableStatus currentStatus)
Shows a collection of statuses that can be used during status transition.
|
static boolean |
transitionAllowed(CableStatus currentStatus,
CableStatus newStatus)
Checks if a transition from one cable status is allowed to another status.
|
public static Collection<CableStatus> possibleStatuses(CableStatus currentStatus)
currentStatus - the status for which the allowed status should be returnedpublic static boolean transitionAllowed(CableStatus currentStatus, CableStatus newStatus)
currentStatus - the cable status to transform fromnewStatus - the new status of the cable to transform totrue if transition is allowed, or throws StatusTransitionExceptionStatusTransitionException - if status transition is not allowed, or if any of the status parameters are NULL value.
The exception message will contain the possibly allowed statusesCopyright © 2025 European Spallation Source. All rights reserved.