private IResolution parseEditRequest(IExecutionContext context) throws DataRetrievalException { UserVO user = null; if (context.isParameterPresent("id")) { String userId = context.getParameter("id"); if (userId != null) { user = accessManager.retrieveUser(new Long(userId)); } } return parseEditRequest(user, context); }
@Override public IResolution parseRequest(IExecutionContext context) { if (!context.isParameterPresent("name")) { try { return parseEditRequest(context); } catch (DataRetrievalException ex) { throw new RuntimeException(ex); } } else { try { return parseAddRequest(context); } catch (DataRetrievalException ex) { throw new RuntimeException(ex); } catch (DataWriteException ex) { throw new RuntimeException(ex); } } }