Пример #1
0
 public InvokeResult removeTasks(Long[] ids) {
   Set<Task> tasks = new HashSet<Task>();
   for (Long id : ids) {
     tasks.add(application.getTask(id));
   }
   application.removeTasks(tasks);
   return InvokeResult.success();
 }
Пример #2
0
 /**
  * 删除数据源
  *
  * @param ids
  * @return
  */
 @ResponseBody
 @RequestMapping("/delete")
 public InvokeResult delete(String ids) {
   if (ids == null) {
     return InvokeResult.failure("数据源ID不能为空");
   }
   String[] idArrs = ids.split(",");
   Long[] idsLong = new Long[idArrs.length];
   for (int i = 0; i < idArrs.length; i++) {
     idsLong[i] = Long.parseLong(idArrs[i]);
   }
   return dataSourceFacade.removeDataSources(idsLong);
 }
Пример #3
0
 public InvokeResult updateTask(TaskDTO taskDTO) {
   application.updateTask(TaskAssembler.toEntity(taskDTO));
   return InvokeResult.success();
 }
Пример #4
0
 public InvokeResult removeTask(Long id) {
   application.removeTask(application.getTask(id));
   return InvokeResult.success();
 }
Пример #5
0
 public InvokeResult getTask(Long id) {
   return InvokeResult.success(TaskAssembler.toDTO(application.getTask(id)));
 }