コード例 #1
0
 @RequestMapping(value = "/search.action", method = RequestMethod.GET)
 @ResponseBody
 public List<AidrCollection> search(@RequestParam String query) throws Exception {
   UserEntity userEntity = getAuthenticatedUser();
   if (userEntity != null) {
     return collectionService.searchByName(query, userEntity.getId());
   }
   return new ArrayList<AidrCollection>();
 }
コード例 #2
0
 @RequestMapping(value = "/start.action", method = RequestMethod.GET)
 @ResponseBody
 public Map<String, Object> start(@RequestParam Integer id) throws Exception {
   UserEntity userEntity = getAuthenticatedUser();
   if (userEntity != null) {
     AidrCollection collection = collectionService.start(id, userEntity.getId());
     return getUIWrapper(collection, true);
   }
   return getUIWrapper(false);
 }
コード例 #3
0
 @RequestMapping(value = "/getRunningCollectionStatusByUser.action", method = RequestMethod.GET)
 @ResponseBody
 public Map<String, Object> runningCollectionByUser() throws Exception {
   UserEntity userEntity = getAuthenticatedUser();
   if (userEntity != null) {
     return getUIWrapper(
         collectionService.getRunningCollectionStatusByUser(userEntity.getId()), true);
   }
   return getUIWrapper(false);
 }
コード例 #4
0
 @RequestMapping(value = "/findAll.action", method = RequestMethod.GET)
 @ResponseBody
 public Map<String, Object> findAll(@RequestParam Integer start, @RequestParam Integer limit)
     throws Exception {
   start = (start != null) ? start : 0;
   limit = (limit != null) ? limit : 50;
   UserEntity userEntity = getAuthenticatedUser();
   if (userEntity != null) {
     CollectionDataResponse dataResponse =
         collectionService.findAll(start, limit, userEntity.getId());
     return getUIWrapper(dataResponse.getData(), dataResponse.getTotal());
   }
   return getUIWrapper(false);
 }