1 /*****************************************************************************
5 * Creation date 11.03.2013
8 * @copyright OPEN CASCADE 2012
9 *****************************************************************************/
11 package org.splat.simer;
13 import org.splat.service.StudyService;
16 * The action for removing a study.
18 * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
20 public class RemoveStudyAction extends Action {
22 * Serialization version UID.
24 private static final long serialVersionUID = -6914581042309013794L;
26 * Injected study service.
28 private StudyService _studyService;
31 * Remove the selected study.
35 public String doRemove() {
36 OpenStudy openStudy = getOpenStudy();
37 if (openStudy != null && openStudy.isOpenForWriting()) {
38 long id = openStudy.getIndex();
39 getStudyService().removeStudy(id);
42 initializationScreenContext("none");
47 * Get the studyService.
49 * @return the studyService
51 public StudyService getStudyService() {
56 * Set the studyService.
59 * the studyService to set
61 public void setStudyService(final StudyService studyService) {
62 _studyService = studyService;