ActionForward forward = this.checkContestAdminPermission(mapping, context, isProblemset, false);
if (forward != null) {
return forward;
}
ContestForm contestForm = (ContestForm) form;
if (contestForm.getId() == null) {
AbstractContest contest = context.getContest();
contestForm.populate(contest);
return this.handleSuccess(mapping, context);
} else {
ContestPersistence persistence = PersistenceManager.getInstance().getContestPersistence();
AbstractContest contest = contestForm.toContest();
persistence.updateContest(contest, context.getUserSecurity().getId());
ContestManager.getInstance().refreshContest(contest.getId());
ActionMessages messages = new ActionMessages();
messages.add("message", new ActionMessage("onlinejudge.editContest.success"));