use of com.emc.vipr.model.catalog.ExecutionInfo in project coprhd-controller by CoprHD.
the class ApiMapperUtils method newExecutionInfo.
public static ExecutionInfo newExecutionInfo(ExecutionStateRestRep state, List<OrderLogRestRep> logs, List<ExecutionLogRestRep> taskLogs) {
ExecutionInfo it = new ExecutionInfo();
it.setStartDate(state.getStartDate());
it.setEndDate(state.getEndDate());
it.setExecutionStatus(state.getExecutionStatus());
it.setCurrentTask(state.getCurrentTask());
it.getAffectedResources().addAll(state.getAffectedResources());
for (OrderLogRestRep log : logs) {
ExecutionLogInfo info = new ExecutionLogInfo();
info.setDate(log.getDate());
info.setLevel(log.getLevel());
info.setMessage(log.getMessage());
info.setPhase(log.getPhase());
info.setStackTrace(log.getStackTrace());
it.getExecutionLogs().add(info);
}
for (ExecutionLogRestRep log : taskLogs) {
ExecutionTaskInfo info = new ExecutionTaskInfo();
info.setDate(log.getDate());
info.setLevel(log.getLevel());
info.setMessage(log.getMessage());
info.setPhase(log.getPhase());
info.setStackTrace(log.getStackTrace());
info.setDetail(log.getDetail());
info.setElapsed(log.getElapsed());
it.getExecutionTasks().add(info);
}
return it;
}
Aggregations