@RequestMapping(value = "/new/dilution/{dilutionId}", method = RequestMethod.GET)
public ModelAndView setupFormWithDilution(@PathVariable Long dilutionId,
ModelMap model) throws IOException {
try {
User user = securityManager.getUserByLoginName(SecurityContextHolder.getContext().getAuthentication().getName());
SolidPool pool = dataObjectFactory.getSolidPool(user);
model.put("title", "New Solid Pool");
if (!pool.userCanRead(user)) {
throw new SecurityException("Permission denied.");
}
if (dilutionId != null) {
emPCRDilution ed = requestManager.getEmPcrDilutionById(dilutionId);
if (ed != null) {
pool.addPoolableElement(ed);
}
}
model.put("formObj", pool);
model.put("pool", pool);