1 package org.splat.simer;
3 import org.splat.dal.bo.som.Study;
4 import org.splat.service.StudyService;
7 public class EditStudyAction extends DisplayStudyStepAction {
12 private static final long serialVersionUID = -4865668290514118396L;
14 private enum Execute { publish, promote }
16 private StudyService _studyService;
18 // ==============================================================================================================================
20 // ==============================================================================================================================
22 public String doEdition () {
24 mystudy = getOpenStudy();
26 Execute todo = Execute.valueOf(action);
27 Study study = mystudy.getStudyObject();
29 if (todo == Execute.publish) getStudyService().moveToPublic(study);
30 else if (todo == Execute.promote) getStudyService().moveToReference(study);
31 mystudy.getPopup().setContext("study", mystudy.getStudyRights()); // The context has changed
35 catch (RuntimeException saverror) {
36 logger.error("Reason:", saverror);
41 * Get the studyService.
43 * @return the studyService
45 public StudyService getStudyService() {
50 * Set the studyService.
53 * the studyService to set
55 public void setStudyService(StudyService studyService) {
56 _studyService = studyService;