@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>();
 }
 @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);
 }
 @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);
 }
 @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);
 }