/** * Use this in place of valueOf. * * @param value * real value * @return StepExecutionState corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static StepExecutionState fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (StepExecutionState enumEntry : StepExecutionState.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * <p> * The state of the step. * </p> * * @param state * The state of the step. * @return Returns a reference to this object so that method calls can be chained together. * @see StepExecutionState */ public StepExecutionStatusDetail withState(StepExecutionState state) { this.state = state.toString(); return this; }
@Override public boolean isStepFailed() { return StepExecutionState.FAILED.name().equalsIgnoreCase( currentStepState ); }
/** * Constructs a new StepExecutionStatusDetail object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param state * The state of the step. * @param creationDateTime * The creation date and time of the step. */ public StepExecutionStatusDetail(StepExecutionState state, java.util.Date creationDateTime) { setState(state.toString()); setCreationDateTime(creationDateTime); }
@Override public boolean isStepRunning() { if ( StepExecutionState.CANCELLED.name().equalsIgnoreCase( currentStepState ) ) { return false; } if ( StepExecutionState.INTERRUPTED.name().equalsIgnoreCase( currentStepState ) ) { return false; } if ( StepExecutionState.COMPLETED.name().equalsIgnoreCase( currentStepState ) ) { return false; } if ( StepExecutionState.FAILED.name().equalsIgnoreCase( currentStepState ) ) { return false; } return true; }
/** * Use this in place of valueOf. * * @param value * real value * @return StepExecutionState corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static StepExecutionState fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (StepExecutionState enumEntry : StepExecutionState.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * <p> * The state of the step. * </p> * * @param state * The state of the step. * @return Returns a reference to this object so that method calls can be chained together. * @see StepExecutionState */ public StepExecutionStatusDetail withState(StepExecutionState state) { this.state = state.toString(); return this; }
@Override public boolean isStepNotSuccess() { currentStepState = getActualStepState(); if ( StepExecutionState.CANCELLED.name().equalsIgnoreCase( currentStepState ) ) { return true; } if ( StepExecutionState.INTERRUPTED.name().equalsIgnoreCase( currentStepState ) ) { return true; } if ( StepExecutionState.FAILED.name().equalsIgnoreCase( currentStepState ) ) { return true; } return false; }
/** * Constructs a new StepExecutionStatusDetail object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param state * The state of the step. * @param creationDateTime * The creation date and time of the step. */ public StepExecutionStatusDetail(StepExecutionState state, java.util.Date creationDateTime) { setState(state.toString()); setCreationDateTime(creationDateTime); }