}
public ActionForward prepareCreateRefereeLetter(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response) {
final PhdCandidacyReferee hashCode =
(PhdCandidacyReferee) PublicCandidacyHashCode.getPublicCandidacyCodeByHash(request.getParameter("hash"));
request.setAttribute("refereeLetterHash", hashCode);
if (hashCode == null) {
request.setAttribute("no-information", Boolean.TRUE);
return mapping.findForward("createRefereeLetterSuccess");
}
if (hashCode.getLetter() != null) {
request.setAttribute("has-letter", Boolean.TRUE);
request.setAttribute("letter", hashCode.getLetter());
return mapping.findForward("createRefereeLetterSuccess");
}
final PhdCandidacyRefereeLetterBean bean = new PhdCandidacyRefereeLetterBean();
bean.setCandidacyReferee(hashCode);
bean.setRefereeName(hashCode.getName());
request.setAttribute("createRefereeLetterBean", bean);
return mapping.findForward("createRefereeLetter");
}