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;
19 * Value of the menu property.
20 * It can be: none, create, open, study, knowledge, sysadmin, help.
22 private String _menuProperty;
24 // ==============================================================================================================================
26 // ==============================================================================================================================
28 public String doEdition () {
30 mystudy = getOpenStudy();
32 Execute todo = Execute.valueOf(action);
33 Study study = mystudy.getStudyObject();
35 if (todo == Execute.publish) getStudyService().moveToPublic(study);
36 else if (todo == Execute.promote) getStudyService().moveToReference(study);
37 mystudy.getPopup().setContext("study", mystudy.getStudyRights()); // The context has changed
39 setMenuProperty("study");
40 initializationScreenContext(_menuProperty);
44 catch (RuntimeException saverror) {
45 logger.error("Reason:", saverror);
50 * Get the studyService.
52 * @return the studyService
54 public StudyService getStudyService() {
59 * Set the studyService.
62 * the studyService to set
64 public void setStudyService(StudyService studyService) {
65 _studyService = studyService;
69 * Get the menuProperty.
70 * @return the menuProperty
72 public String getMenuProperty() {
77 * Set the menuProperty.
78 * @param menuProperty the menuProperty to set
80 public void setMenuProperty(String menuProperty) {
81 this._menuProperty = menuProperty;