Skip to main content
Version: latest

Status

Status is an interface in v2.0.0. Use isFailure() instead of the old isFail().

Interface

interface Status {
boolean isStaged();
boolean isPass();
boolean isFailure();
boolean isSkip();
String getDisplayName();
Optional<String> getMessage();
Optional<Throwable> getThrowable();
}

Display names

StatusDisplay name
StagedSTAGED
PassPASS
FailureFAIL
SkipSKIP

Checking status

if (result.getStatus().isPass()) { /* action passed */ }
if (result.getStatus().isFailure()) { /* action failed */ }
if (result.getStatus().isSkip()) { /* action was skipped */ }

Kind enum

The SPI implementation DefaultStatus exposes a Kind enum:

enum Kind { STAGED, PASS, FAILURE, SKIP }

This is internal to the SPI. Prefer using the interface methods (isPass(), isFailure(), isSkip()) for status checks.

Creating status instances

Status instances are created internally by the framework during action execution. You do not typically create them yourself. The SPI provides factory constructors for custom action implementations:

// In org.paramixel.core.spi.DefaultStatus:
DefaultStatus(Kind kind)
DefaultStatus(Kind kind, String message)
DefaultStatus(Kind kind, Throwable throwable)
DefaultStatus(Kind kind, String message, Throwable throwable)