@Test public void testGenerateOperationProgressNoIssuesDefaultProgress() { OperationProgress progress = executor.generateOperationProgress(null); validateFields(progress, ProcessingState.WAITING, null); }
protected OperationProgress generateOperationProgress(OperationProgress existingProgress) { OperationProgress operationProgress = existingProgress == null ? new OperationProgress() : existingProgress; if(operationProgress.getProcessingState() == null) operationProgress.setProcessingState(ProcessingState.WAITING); operationProgress.setStartedTime(startTime); operationProgress.setCompletedTime(completedTime); operationProgress.setOperation(operation.getName()); operationProgress.setResultPayload(outputPayload); if(residentHandlerException != null) { operationProgress.setProcessingState(ProcessingState.COMPLETE); operationProgress.setProcessingStateMessage(CompleteStateMessage.FAILED.toString()); appendExceptionDiagnosticEvent(operationProgress, residentHandlerException); } return operationProgress; }
ResidentOperationExecutor extends BaseOperationExecutor { protected OperationProgress generateOperationProgress(OperationProgress existingProgress) { OperationProgress operationProgress = existingProgress == null ? new OperationProgress() : existingProgress; if(operationProgress.getProcessingState() == null) operationProgress.setProcessingState(ProcessingState.WAITING); operationProgress.setStartedTime(startTime); operationProgress.setCompletedTime(completedTime); operationProgress.setOperation(operation.getName()); operationProgress.setResultPayload(outputPayload); if(residentHandlerException != null) { operationProgress.setProcessingState(ProcessingState.COMPLETE); operationProgress.setProcessingStateMessage(CompleteStateMessage.FAILED.toString()); appendExceptionDiagnosticEvent(operationProgress, residentHandlerException); } return operationProgress; } }
ResidentOperationExecutor extends BaseOperationExecutor { protected OperationProgress generateOperationProgress(OperationProgress existingProgress) { OperationProgress operationProgress = existingProgress == null ? new OperationProgress() : existingProgress; if(operationProgress.getProcessingState() == null) operationProgress.setProcessingState(ProcessingState.WAITING); operationProgress.setStartedTime(startTime); operationProgress.setCompletedTime(completedTime); operationProgress.setOperation(operation.getName()); operationProgress.setResultPayload(outputPayload); if(residentHandlerException != null) { operationProgress.setProcessingState(ProcessingState.COMPLETE); operationProgress.setProcessingStateMessage(CompleteStateMessage.FAILED.toString()); appendExceptionDiagnosticEvent(operationProgress, residentHandlerException); } return operationProgress; } ResidentOperationExecutor(Operation operation, ResidentHandler residentHandler, LaunchDataWrapper launchDataWrapper); }
ResidentOperationExecutor extends BaseOperationExecutor { protected OperationProgress generateOperationProgress(OperationProgress existingProgress) { OperationProgress operationProgress = existingProgress == null ? new OperationProgress() : existingProgress; if(operationProgress.getProcessingState() == null) operationProgress.setProcessingState(ProcessingState.WAITING); operationProgress.setStartedTime(startTime); operationProgress.setCompletedTime(completedTime); operationProgress.setOperation(operation.getName()); operationProgress.setResultPayload(outputPayload); if(residentHandlerException != null) { operationProgress.setProcessingState(ProcessingState.COMPLETE); operationProgress.setProcessingStateMessage(CompleteStateMessage.FAILED.toString()); appendExceptionDiagnosticEvent(operationProgress, residentHandlerException); } return operationProgress; } ResidentOperationExecutor(Operation operation, ResidentHandler residentHandler, LaunchDataWrapper launchDataWrapper); @Override OperationProgress retrieveOperationProgress(); @Override String execute(String payload); }
ResidentOperationExecutor extends BaseOperationExecutor { protected OperationProgress generateOperationProgress(OperationProgress existingProgress) { OperationProgress operationProgress = existingProgress == null ? new OperationProgress() : existingProgress; if(operationProgress.getProcessingState() == null) operationProgress.setProcessingState(ProcessingState.WAITING); operationProgress.setStartedTime(startTime); operationProgress.setCompletedTime(completedTime); operationProgress.setOperation(operation.getName()); operationProgress.setResultPayload(outputPayload); if(residentHandlerException != null) { operationProgress.setProcessingState(ProcessingState.COMPLETE); operationProgress.setProcessingStateMessage(CompleteStateMessage.FAILED.toString()); appendExceptionDiagnosticEvent(operationProgress, residentHandlerException); } return operationProgress; } ResidentOperationExecutor(Operation operation, ResidentHandler residentHandler, LaunchDataWrapper launchDataWrapper); @Override OperationProgress retrieveOperationProgress(); @Override String execute(String payload);  }