@RequestMapping( value = "/save.action", method = {RequestMethod.POST}) @ResponseBody public Map<String, Object> save(AidrCollection collection) throws Exception { logger.info("Save AidrCollection to Database having code : " + collection.getCode()); try { UserEntity entity = getAuthenticatedUser(); collection.setUser(entity); collection.setStatus(CollectionStatus.NOT_RUNNING); Calendar now = Calendar.getInstance(); collection.setCreatedDate(now.getTime()); collectionService.create(collection); return getUIWrapper(true); } catch (Exception e) { logger.error("Error while saving AidrCollection Info to database", e); return getUIWrapper(false); } }