コード例 #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)));
 }