import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.Transaction;
-import org.splat.som.Database;
-import org.splat.som.Study;
+import org.splat.dal.dao.som.Database;
+import org.splat.dal.bo.som.Study;
+import org.splat.service.StudyService;
public class EditStudyAction extends DisplayStudyStepAction {
private enum Execute { publish, promote }
+ private StudyService _studyService;
+
// ==============================================================================================================================
// Action methods
// ==============================================================================================================================
Execute todo = Execute.valueOf(action);
Study study = mystudy.getStudyObject();
- if (todo == Execute.publish) study.moveToPublic();
- else if (todo == Execute.promote) study.moveToReference();
+ if (todo == Execute.publish) getStudyService().moveToPublic(study);
+ else if (todo == Execute.promote) getStudyService().moveToReference(study);
mystudy.getPopup().setContext("study", mystudy.getStudyRights()); // The context has changed
// Useless to update the open study
return ERROR;
}
}
+ /**
+ * Get the studyService.
+ *
+ * @return the studyService
+ */
+ public StudyService getStudyService() {
+ return _studyService;
+ }
+
+ /**
+ * Set the studyService.
+ *
+ * @param studyService
+ * the studyService to set
+ */
+ public void setStudyService(StudyService studyService) {
+ _studyService = studyService;
+ }
}
\ No newline at end of file