/** * @param description string form of drop flow file state * @return the matching DropFlowFileState or null if the description doesn't match */ public static DropFlowFileState valueOfDescription(String description) { DropFlowFileState desiredState = null; for (DropFlowFileState state : values()) { if (state.toString().equals(description)) { desiredState = state; break; } } return desiredState; } }
final DropFlowFileState nodeState = DropFlowFileState.valueOfDescription(nodeDropRequest.getState()); if (state == null || state.ordinal() > nodeState.ordinal()) { state = nodeState; clientDto.setState(state.toString());
dto.setSubmissionTime(new Date(dropRequest.getRequestSubmissionTime())); dto.setLastUpdated(new Date(dropRequest.getLastUpdated())); dto.setState(dropRequest.getState().toString()); dto.setFailureReason(dropRequest.getFailureReason()); dto.setFinished(isDropRequestComplete(dropRequest.getState()));