1 package org.splat.simer;
3 import org.splat.dal.bo.som.Study;
5 public class EditStudyAction extends DisplayStudyStepAction {
10 private static final long serialVersionUID = -4865668290514118396L;
12 private enum Execute {
13 publish, protect, promote
16 // ==============================================================================================================================
18 // ==============================================================================================================================
20 public String doEdition() {
21 _openStudy = getOpenStudy();
23 Execute todo = Execute.valueOf(_action);
24 Study study = _openStudy.getStudyObject();
26 if (todo == Execute.publish) {
27 getStudyService().moveToPublic(study);
28 } else if (todo == Execute.protect) {
29 getStudyService().moveToPrivate(study);
30 } else if (todo == Execute.promote) {
31 getStudyService().moveToReference(study);
33 _openStudy.getPopup().setContext("study", _openStudy.getStudyRights()); // The context has changed
38 _selection = _openStudy.getSelection(); //actually, value doesn't matter, it just has to be not null
44 * Mark study as reference functionality.
47 public String doMarkAsReference() {
49 _openStudy = getOpenStudy();
50 Study study = _openStudy.getStudyObject();
52 getStudyService().markStudyAsReference(study);
55 _selection = _openStudy.getSelection(); //actually, value doesn't matter, it just has to be not null
61 * Remove study as reference functionality.
64 public String doRemoveAsReference() {
66 _openStudy = getOpenStudy();
67 Study study = _openStudy.getStudyObject();
69 getStudyService().removeStudyAsReference(study);
72 _selection = _openStudy.getSelection(); //actually, value doesn't matter, it just has to be not null