@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());
LS454Pool pool = dataObjectFactory.getLS454Pool(user);
model.put("title", "New 454 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);