use of org.jaffa.modules.scheduler.services.JaffaSchedulerApplicationException in project jaffa-framework by jaffa-projects.
the class TaskMaintenanceTx method retrieve.
/**
* Returns the details for Task.
* @param input The criteria based on which an object will be retrieved.
* @throws ApplicationExceptions This will be thrown if the criteria contains invalid data.
* @throws FrameworkException Indicates some system error.
* @return The object details. A null indicates, the object was not found.
*/
public TaskMaintenanceOutDto retrieve(TaskMaintenanceDto input) throws FrameworkException, ApplicationExceptions {
if (log.isDebugEnabled())
log.debug("Input to retrieve(): " + input);
// Retrieve the task
ScheduledTask task = SchedulerHelperFactory.instance().getTask(input.getScheduledTaskId());
if (task == null)
throw new ApplicationExceptions(new JaffaSchedulerApplicationException(JaffaSchedulerApplicationException.TASK_NOT_FOUND, new Object[] { input.getScheduledTaskId() }));
// Mold the task into the TaskMaintenanceDto
TaskMaintenanceOutDto output = buildRetrieveOutDto(task);
if (log.isDebugEnabled())
log.debug("Output from retrieve(): " + output);
return output;
}
Aggregations