Salome HOME
Modifications done to respect PMD rules. Versioning a document is fixed. Validation...
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / StudyPropertiesAction.java
index 6560b703f8b32e80464a20d0be38f0ffc9e0e84e..e38497d8e61d2fb78a28d2b2a597d09defa85f6f 100644 (file)
@@ -4,357 +4,492 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
 
-import org.hibernate.Session;
-import org.hibernate.Transaction;
 import org.splat.kernel.InvalidPropertyException;
 import org.splat.kernel.Name;
 import org.splat.dal.bo.kernel.User;
-import org.splat.kernel.UserDirectory;
+import org.splat.service.DocumentTypeService;
 import org.splat.service.StudyService;
+import org.splat.service.UserService;
 import org.splat.som.ApplicationRights;
-import org.splat.dal.dao.som.Database;
-import org.splat.dal.bo.som.Document;
 import org.splat.dal.bo.som.DocumentType;
 import org.splat.dal.bo.som.Study;
 import org.splat.som.StudyRights;
 import org.splat.dal.bo.som.ValidationCycle;
 import org.splat.dal.bo.som.ValidationStep;
 
-
+/**
+ * Edit/display study properties (study configuration) screen action.
+ */
 public class StudyPropertiesAction extends DisplayStudyStepAction {
 
-//  Presentation fields
-    private List<User>             staff;
-    private List<User>             member;
-    private List<Name>             validor;
-    private List<ValidationFacade> validation;
-    private ValidationFacade       validefault;
-    private List<DocumentType>     other;
-
-//  User input fields
-    private Save                   tosave;         // Edition action (title, contributors or cycle)
-    private String                 edicycle;
-    private String                 stitle;         // Title of the study
-    private String                 contributors;   // List of existing contributors, some of them may have been removed
-    private String                 candidates;     // List of added contributors
-    private int                    type;           // Type of document to be included in the validation process
-    private int                    publisher;
-    private int                    reviewer;
-    private int                    approver;
+       /**
+        * Serial version ID.
+        */
+       private static final long serialVersionUID = 4210696018741092900L;
+
+       // Presentation fields
+       private List<User> staff;
+       private List<User> member;
+       private List<Name> validor;
+       private List<ValidationFacade> validation;
+       private ValidationFacade validefault;
+       private List<DocumentType> other;
+
+       // User input fields
+       private Save tosave; // Edition action (title, contributors or cycle)
+       private String edicycle;
+       private String stitle; // Title of the study
+       private String contributors; // List of existing contributors, some of them may have been removed
+       private String candidates; // List of added contributors
+       private long type; // Type of document to be included in the validation process
+       private int publisher;
+       private int reviewer;
+       private int approver;
+
+       /**
+        * Injected study service.
+        */
        private StudyService _studyService;
+       /**
+        * Injected document type service.
+        */
+       private DocumentTypeService _documentTypeService;
 
-       private static final long serialVersionUID = 4210696018741092900L;
+       /**
+        * Injected user service.
+        */
+       private UserService _userService;
+       
+       /**
+        * Value of the menu property. 
+        * It can be: none, create, open, study, knowledge, sysadmin, help.
+        */
+       private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Value of the tool bar property. 
+        * It can be: none, standard, study, back.
+        */
+       private String _toolProperty;
+       
+       /**
+        * Value of the left menu property. 
+        * It can be: open, study, knowledge, scenario.
+        */
+       private String _leftMenuProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
+
+       /**
+        * Save operation type enumeration pointing which section of properties has been edited.
+        */
+       private enum Save {
+               /**
+                * Save study title.
+                */
+               title,
+               /**
+                * Save contributors.
+                */
+               contributor,
+               /**
+                * Save validation cycle.
+                */
+               cycle
+       }
+
+       // ==============================================================================================================================
+       // Action methods
+       // ==============================================================================================================================
+
+       /**
+        * Initialize study properties action.
+        * 
+        * @return "edit" if user can edit study properties, otherwise return "display"
+        */
+       public String doInitialize() {
+
+               mystudy = getOpenStudy();
+               validation = new Vector<ValidationFacade>();
+               validefault = null;
+               other = getDocumentTypeService().selectResultTypes();
+
+               Study study = mystudy.getStudyObject();
+               StudyRights user = mystudy.getStudyRights();
+               for (Iterator<DocumentType> i = other.iterator(); i.hasNext();) {
+                       DocumentType type = i.next();
+                       ValidationCycle cycle = getStudyService().getValidationCycleOf(study, type);
+                       if (cycle.isDefault()) {
+                               validefault = new ValidationFacade(cycle);
+                               continue;
+                       }
+                       validation.add(new ValidationFacade(cycle));
+                       i.remove();
+               }
+               if (validefault != null)
+                       validation.add(validefault); // In order to be at the end
+               member = getStudyService().getContributors(study);
+               staff = null;
+               validor = null;
+               
+               setMenuProperty("study");
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+               setToolProperty("back");
+               setLeftMenuProperty("open");
+               initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
+
+               if (mystudy.isOpenForWriting() && user.canEditProperties()) {                   
+                       return "edit";
+               }
+               else {
+                       return "display";
+               }
+       }
+
+       public String doEditTitle() {
+//             Session connex = Database.getCurSession();
+//             Transaction transax = connex.beginTransaction();
+
+               mystudy = getOpenStudy();
+               validation = new Vector<ValidationFacade>();
+               validefault = null;
+               other = getDocumentTypeService().selectResultTypes();
+
+               Study study = mystudy.getStudyObject();
+               for (Iterator<DocumentType> i = other.iterator(); i.hasNext();) {
+                       DocumentType type = i.next();
+                       ValidationCycle cycle = getStudyService().getValidationCycleOf(study, type);
+                       if (cycle.isDefault()) {
+                               validefault = new ValidationFacade(cycle);
+                               continue;
+                       }
+                       validation.add(new ValidationFacade(cycle));
+               }
+               if (validefault != null)
+                       validation.add(validefault); // In order to be at the end
+               member = getStudyService().getContributors(study);
+               staff = null;
+               validor = null;
+               other = null;
+
+//             transax.commit();
+               
+               setMenuProperty("study");
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+               setToolProperty("back");
+               setLeftMenuProperty("open");
+               initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
+
+               return SUCCESS;
+       }
+
+       public String doEditContributors() {
+//             Session connex = Database.getCurSession();
+//             Transaction transax = connex.beginTransaction();
+
+               mystudy = getOpenStudy();
+               validation = new Vector<ValidationFacade>();
+               validefault = null;
+               other = getDocumentTypeService().selectAllTypes();
+
+               Study study = mystudy.getStudyObject();
+               for (Iterator<DocumentType> i = other.iterator(); i.hasNext();) {
+                       DocumentType type = i.next();
+                       ValidationCycle cycle = getStudyService().getValidationCycleOf(study, type);
+                       if (cycle.isDefault()) {
+                               validefault = new ValidationFacade(cycle);
+                               continue;
+                       }
+                       validation.add(new ValidationFacade(cycle));
+               }
+               if (validefault != null)
+                       validation.add(validefault); // In order to be at the end
+               member = getStudyService().getContributors(study);
+               staff = getUserService().selectAllUsers();
+               validor = null;
+               other = null;
+               User me = this.getConnectedUser();
+               for (Iterator<User> i = staff.iterator(); i.hasNext();) {
+                       User next = i.next();
+                       ApplicationRights he = new ApplicationRights(next);
+                       if (next.equals(me) || member.contains(next)
+                                       || !he.canContributeToStudy())
+                               i.remove();
+               }
+//             transax.commit();
+               
+               setMenuProperty("study");
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+               setToolProperty("back");
+               setLeftMenuProperty("open");
+               initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
+
+               return SUCCESS;
+       }
+
+       public String doEditCycle() {
+//             Session connex = Database.getCurSession();
+//             Transaction transax = connex.beginTransaction();
+
+               mystudy = getOpenStudy();
+               validation = new Vector<ValidationFacade>();
+               validefault = null;
+               other = getDocumentTypeService().selectResultTypes();
+
+               Study study = mystudy.getStudyObject();
+               for (Iterator<DocumentType> i = other.iterator(); i.hasNext();) {
+                       DocumentType type = i.next();
+                       ValidationCycle cycle = getStudyService().getValidationCycleOf(study, type);
+                       if (cycle.isDefault()) {
+                               validefault = new ValidationFacade(cycle);
+                               continue;
+                       }
+                       if (type.getName().equals(edicycle)) {
+                               this.type = type.getIndex();
+                       }
+                       validation.add(new ValidationFacade(cycle));
+                       i.remove();
+               }
+               if (validefault != null)
+                       validation.add(validefault); // In order to be at the end
+               member = getStudyService().getContributors(study);
+               validor = new Vector<Name>();
+               staff = null;
+               List<User> user = getUserService().selectAllUsers();
+               for (Iterator<User> i = user.iterator(); i.hasNext();) {
+                       User next = i.next();
+                       ApplicationRights he = new ApplicationRights(next);
+                       if (he.canValidate()) {
+                               if (next.equals(study.getAuthor()))
+                                       validor.add(new ValidationFacade.ByManager(next));
+                               else
+                                       validor.add(next);
+                       }
+               }
+//             transax.commit();
+               
+               setMenuProperty("study");
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+               setToolProperty("back");
+               setLeftMenuProperty("open");
+               initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
+
+               return SUCCESS;
+       }
+
+       public String doEdition() {
+               // --------------------------
+//             Session connex = Database.getCurSession();
+//             Transaction transax = connex.beginTransaction();
+               Study study = getOpenStudy().getStudyObject();
+
+               if (tosave == Save.title) {
+
+                       // Edition of the title
+                       Study.Properties sprop = new Study.Properties();
+                       try {
+                               getStudyService().update(study, sprop.setTitle(stitle));
+                       } catch (InvalidPropertyException e) {
+                               // TODO
+                       }
+               } else if (tosave == Save.contributor) {
+
+                       // Edition of contributors
+                       if (contributors == null)
+                               contributors = "";
+                       if (candidates == null)
+                               candidates = "";
+
+                       String[] parsekept = contributors.split(",");
+                       String[] parsenew = candidates.split(",");
+                       Vector<User> toremove = new Vector<User>(getStudyService().getContributors(study));
+
+                       for (int i = 0; i < parsekept.length; i++) {
+                               if (parsekept[i].length() == 0)
+                                       continue; // Yet no contributor
+                               int index = Integer.valueOf(parsekept[i].trim());
+                               for (Iterator<User> j = toremove.iterator(); j.hasNext();) {
+                                       long present = j.next().getIndex();
+                                       if (present != index)
+                                               continue;
+                                       j.remove();
+                                       break;
+                               }
+                       }
+                       int size = toremove.size();
+                       if (size > 0)
+                               getStudyService().removeContributor(study,
+                                               toremove.toArray(new User[size]));
+
+                       for (int i = 0; i < parsenew.length; i++) {
+                               if (parsenew[i].length() == 0)
+                                       continue; // No any new contributor
+                               int index = Integer.valueOf(parsenew[i].trim());
+                               User newser = getUserService().selectUser(index);
+
+                               getStudyService().addContributor(study, newser);
+                       }
+               } else if (tosave == Save.cycle) {
+
+                       // Addition of a document validation cycle
+                       DocumentType apply = getDocumentTypeService().selectType(type);
+                       ValidationCycle.Properties vprop = new ValidationCycle.Properties();
+                       if (publisher > 0) {
+                               User actor = getUserService().selectUser(publisher);
+                               vprop.setActor(ValidationStep.PROMOTION, actor);
+                       }
+                       if (reviewer > 0) {
+                               User actor = getUserService().selectUser(reviewer);
+                               vprop.setActor(ValidationStep.REVIEW, actor);
+                       }
+                       if (approver > 0) {
+                               User actor = getUserService().selectUser(approver);
+                               vprop.setActor(ValidationStep.APPROVAL, actor);
+                       }
+                       getStudyService().setValidationCycle(study, apply, vprop);
+               }
+//             transax.commit();
+
+               doInitialize(); // Re-initialization following the above edition
+               
+               setMenuProperty("study");
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+               setToolProperty("back");
+               setLeftMenuProperty("open");
+               initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
+
+               return SUCCESS;
+       }
+
+       // ==============================================================================================================================
+       // Getters
+       // ==============================================================================================================================
+
+       public User getAuthor() {
+               // ------------------------
+               return mystudy.getStudyObject().getAuthor();
+       }
+
+       public List<User> getCandidates() {
+               // ----------------------------------
+               return staff;
+       }
+
+       public String getCycle() {
+               // -------------------------
+               return edicycle;
+       }
+
+       public List<User> getContributors() {
+               // ------------------------------------
+               return member;
+       }
+
+       public ValidationFacade getDefaultValidation() {
+               // -----------------------------------------------
+               return validefault;
+       }
+
+       public long getDocumentTypeIndex() {
+               // ----------------------------------
+               return type;
+       }
+
+       public List<DocumentType> getOtherDocumentTypes() {
+               // --------------------------------------------------
+               return other;
+       }
+
+       public String getStudyTitle() {
+               // ------------------------------
+               return mystudy.getTitle();
+       }
+
+       public List<ValidationFacade> getValidations() {
+               // -----------------------------------------------
+               return validation;
+       }
+
+       public List<Name> getValidationActors() {
+               // ----------------------------------------
+               return validor;
+       }
+
+       // ==============================================================================================================================
+       // Setters
+       // ==============================================================================================================================
+
+       public void setCandidates(String indices) {
+               // ------------------------------------------
+               candidates = indices;
+       }
+
+       public void setCycle(String type) {
+               // ----------------------------------
+               edicycle = type;
+       }
+
+       public void setMembers(String indices) {
+               // ---------------------------------------
+               contributors = indices;
+       }
+
+       public void setDocumentType(String index) {
+               // ------------------------------------------
+               type = Integer.valueOf(index);
+       }
+
+       public void setApprover(String index) {
+               // --------------------------------------
+               approver = Integer.valueOf(index);
+       }
+
+       public void setPublisher(String index) {
+               // ---------------------------------------
+               publisher = Integer.valueOf(index);
+       }
+
+       public void setReviewer(String index) {
+               // --------------------------------------
+               reviewer = Integer.valueOf(index);
+       }
+
+       public void setTitle(String title) {
+               // -----------------------------------
+               stitle = title;
+       }
+
+       public void setSaveTitle(String save) {
+               // --------------------------------------
+               tosave = Save.title;
+       }
+
+       public void setSaveContributors(String save) {
+               // ---------------------------------------------
+               tosave = Save.contributor;
+       }
+
+       public void setSaveCycle(String save) {
+               // --------------------------------------
+               tosave = Save.cycle;
+       }
 
-    private enum Save { title, contributor, cycle }
-
-//  ==============================================================================================================================
-//  Action methods
-//  ==============================================================================================================================
-
-       public String doInitialize () {
-//  -----------------------------
-      Session      connex  = Database.getSession();
-      Transaction  transax = connex.beginTransaction();
-
-      mystudy     = getOpenStudy();
-      validation  = new Vector<ValidationFacade>();
-      validefault = null;
-         other       = Document.selectResultTypes();
-
-         Study        study = mystudy.getStudyObject();
-         StudyRights  user  = mystudy.getStudyRights();
-      for (Iterator<DocumentType> i=other.iterator(); i.hasNext(); ) {
-       DocumentType    type  = i.next();
-       ValidationCycle cycle = study.getValidationCycleOf(type);
-       if (cycle.isDefault()) {
-         validefault = new ValidationFacade(cycle);
-         continue;
-       }
-        validation.add( new ValidationFacade(cycle) );
-        i.remove();
-      }
-         if (validefault != null) validation.add(validefault);   // In order to be at the end
-      member  = study.getContributors();
-      staff   = null;
-      validor = null;
-
-      transax.commit();
-      if (mystudy.isOpenForWriting() && user.canEditProperties()) return "edit";
-      else return "display";
-    }
-
-       public String doEditTitle () {
-//  ----------------------------
-      Session      connex  = Database.getSession();
-      Transaction  transax = connex.beginTransaction();
-
-      mystudy     = getOpenStudy();
-      validation  = new Vector<ValidationFacade>();
-      validefault = null;
-         other       = Document.selectResultTypes();
-
-         Study study = mystudy.getStudyObject();
-      for (Iterator<DocumentType> i=other.iterator(); i.hasNext(); ) {
-       DocumentType    type  = i.next();
-       ValidationCycle cycle = study.getValidationCycleOf(type);
-       if (cycle.isDefault()) {
-         validefault = new ValidationFacade(cycle);
-         continue;
-       }
-        validation.add( new ValidationFacade(cycle) );
-      }
-         if (validefault != null) validation.add(validefault);   // In order to be at the end
-      member  = study.getContributors();
-      staff   = null;
-      validor = null;
-      other   = null;
-
-      transax.commit();
-      return SUCCESS;
-    }
-
-       public String doEditContributors () {
-//  -----------------------------------
-      Session      connex  = Database.getSession();
-      Transaction  transax = connex.beginTransaction();
-
-      mystudy     = getOpenStudy();
-      validation  = new Vector<ValidationFacade>();
-      validefault = null;
-         other       = Document.selectAllTypes();
-
-         Study study = mystudy.getStudyObject();
-      for (Iterator<DocumentType> i=other.iterator(); i.hasNext(); ) {
-       DocumentType    type  = i.next();
-       ValidationCycle cycle = study.getValidationCycleOf(type);
-       if (cycle.isDefault()) {
-         validefault = new ValidationFacade(cycle);
-         continue;
-       }
-        validation.add( new ValidationFacade(cycle) );
-      }
-         if (validefault != null) validation.add(validefault);   // In order to be at the end
-      member  = study.getContributors();
-      staff   = UserDirectory.selectAllUsers();
-      validor = null;
-      other   = null;
-      User me = this.getConnectedUser();
-      for (Iterator<User> i=staff.iterator(); i.hasNext(); ) {
-        User              next = i.next();
-        ApplicationRights he   = new ApplicationRights(next);
-        if (next.equals(me) || member.contains(next) || !he.canContributeToStudy()) i.remove();
-      }
-      transax.commit();
-      return SUCCESS;
-    }
-
-       public String doEditCycle () {
-//  ----------------------------
-      Session      connex  = Database.getSession();
-      Transaction  transax = connex.beginTransaction();
-
-      mystudy     = getOpenStudy();
-      validation  = new Vector<ValidationFacade>();
-      validefault = null;
-         other       = Document.selectResultTypes();
-
-         Study study = mystudy.getStudyObject();
-      for (Iterator<DocumentType> i=other.iterator(); i.hasNext(); ) {
-       DocumentType    type  = i.next();
-       ValidationCycle cycle = study.getValidationCycleOf(type);
-       if (cycle.isDefault()) {
-         validefault = new ValidationFacade(cycle);
-         continue;
-       }
-       if (type.getName().equals(edicycle)) {
-          this.type = type.getIndex();
-       }
-        validation.add( new ValidationFacade(cycle) );
-        i.remove();
-      }
-         if (validefault != null) validation.add(validefault);   // In order to be at the end
-      member  = study.getContributors();
-      validor = new Vector<Name>();
-      staff   = null;
-      List<User>            user = UserDirectory.selectAllUsers();
-      for (Iterator<User> i=user.iterator(); i.hasNext(); ) {
-        User              next = i.next();
-        ApplicationRights he   = new ApplicationRights(next);
-        if (he.canValidate()) {
-          if (next.equals(study.getAuthor())) validor.add( new ValidationFacade.ByManager(next) );
-          else                                validor.add(next);
-        }
-      }
-      transax.commit();
-      return SUCCESS;
-    }
-
-    public String doEdition () {
-//  --------------------------
-      Session      connex  = Database.getSession();
-      Transaction  transax = connex.beginTransaction();
-      Study        study   = getOpenStudy().getStudyObject();
-
-      if (tosave == Save.title) {
-
-//      Edition of the title
-        Study.Properties sprop = new Study.Properties();
-        try {
-               getStudyService().update(study, sprop.setTitle(stitle));
-        }
-        catch (InvalidPropertyException e) {
-//TODO
-        }
-      } else
-      if (tosave == Save.contributor) {
-
-//      Edition of contributors
-        if (contributors == null) contributors = "";
-        if (candidates   == null) candidates   = "";
-
-        String[]     parsekept = contributors.split(",");
-        String[]     parsenew  = candidates.split(",");
-        Vector<User> toremove  = new Vector<User>(study.getContributors());
-
-        for (int i=0; i<parsekept.length; i++) {
-          if (parsekept[i].length() == 0) continue;   // Yet no contributor
-          int  index = Integer.valueOf(parsekept[i].trim());
-          for (Iterator<User> j=toremove.iterator(); j.hasNext(); ){
-            int present = j.next().getIndex();
-            if (present != index) continue;
-            j.remove();
-            break;
-          }
-        }
-        int size = toremove.size();
-        if (size > 0) getStudyService().removeContributor(study, toremove.toArray(new User[size]));
-
-        for (int i=0; i<parsenew.length; i++) {
-          if (parsenew[i].length() == 0) continue;    // No any new contributor
-          int  index  = Integer.valueOf(parsenew[i].trim());
-          User newser = UserDirectory.selectUser(index);
-
-          getStudyService().addContributor(study, newser);
-        }
-      } else
-      if (tosave == Save.cycle) {
-
-//      Addition of a document validation cycle
-       DocumentType               apply = Document.selectType(type);
-        ValidationCycle.Properties vprop = new ValidationCycle.Properties();
-       if (publisher > 0) {
-         User actor = UserDirectory.selectUser(publisher);
-          vprop.setActor(ValidationStep.PROMOTION, actor);
-       }
-       if (reviewer > 0) {
-         User actor = UserDirectory.selectUser(reviewer);
-          vprop.setActor(ValidationStep.REVIEW, actor);
-       }
-       if (approver > 0) {
-         User actor = UserDirectory.selectUser(approver);
-          vprop.setActor(ValidationStep.APPROVAL, actor);
-       }
-       getStudyService().setValidationCycle(study, apply, vprop);
-      }
-      transax.commit();
-
-      doInitialize();     // Re-initialization following the above edition
-      return SUCCESS;
-       }
-
-//  ==============================================================================================================================
-//  Getters
-//  ==============================================================================================================================
-
-    public User getAuthor () {
-//  ------------------------
-      return mystudy.getStudyObject().getAuthor();
-    }
-    public List<User> getCandidates () {
-//  ----------------------------------
-      return staff;
-    }
-    public String getCycle () {
-//  -------------------------
-      return edicycle;
-    }
-    public List<User> getContributors () {
-//  ------------------------------------
-      return member;
-    }
-    public ValidationFacade getDefaultValidation () {
-//  -----------------------------------------------
-      return validefault;
-    }
-    public int getDocumentTypeIndex () {
-//  ----------------------------------
-      return type;
-    }
-    public List<DocumentType> getOtherDocumentTypes () {
-//  --------------------------------------------------
-      return other;
-    }
-    public String getStudyTitle () {
-//  ------------------------------
-      return mystudy.getTitle();
-    }
-    public List<ValidationFacade> getValidations () {
-//  -----------------------------------------------
-      return validation;
-    }
-    public List<Name> getValidationActors () {
-//  ----------------------------------------
-      return validor;
-    }
-
-//  ==============================================================================================================================
-//  Setters
-//  ==============================================================================================================================
-
-    public void setCandidates (String indices) {
-//  ------------------------------------------
-      candidates = indices;
-    }
-    public void setCycle (String type) {
-//  ----------------------------------
-      edicycle = type;
-    }
-    public void setMembers (String indices) {
-//  ---------------------------------------
-      contributors = indices;
-    }
-    public void setDocumentType (String index) {
-//  ------------------------------------------
-      type = Integer.valueOf(index);
-    }
-    public void setApprover (String index) {
-//  --------------------------------------
-      approver = Integer.valueOf(index);
-    }
-    public void setPublisher (String index) {
-//  ---------------------------------------
-      publisher = Integer.valueOf(index);
-    }
-    public void setReviewer (String index) {
-//  --------------------------------------
-      reviewer = Integer.valueOf(index);
-    }
-    public void setTitle (String title) {
-//  -----------------------------------
-      stitle = title;
-    }
-    public void setSaveTitle (String save) {
-//  --------------------------------------
-      tosave = Save.title;
-    }
-    public void setSaveContributors (String save) {
-//  ---------------------------------------------
-      tosave = Save.contributor;
-    }
-    public void setSaveCycle (String save) {
-//  --------------------------------------
-      tosave = Save.cycle;
-    }
        /**
         * Get the studyService.
         * 
@@ -373,4 +508,119 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
        public void setStudyService(StudyService studyService) {
                _studyService = studyService;
        }
+
+       /**
+        * Get the documentTypeService.
+        * 
+        * @return the documentTypeService
+        */
+       public DocumentTypeService getDocumentTypeService() {
+               return _documentTypeService;
+       }
+
+       /**
+        * Set the documentTypeService.
+        * 
+        * @param documentTypeService
+        *            the documentTypeService to set
+        */
+       public void setDocumentTypeService(DocumentTypeService documentTypeService) {
+               _documentTypeService = documentTypeService;
+       }
+
+       /**
+        * Get the userService.
+        * @return the userService
+        */
+       public UserService getUserService() {
+               return _userService;
+       }
+
+       /**
+        * Set the userService.
+        * @param userService the userService to set
+        */
+       public void setUserService(UserService userService) {
+               _userService = userService;
+       }
+       
+       /**
+        * Get the menuProperty.
+        * @return the menuProperty
+        */
+       public String getMenuProperty() {
+               return _menuProperty;
+       }
+
+       /**
+        * Set the menuProperty.
+        * @param menuProperty the menuProperty to set
+        */
+       public void setMenuProperty(String menuProperty) {
+               this._menuProperty = menuProperty;
+       }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
+       /**
+        * Get the toolProperty.
+        * @return the toolProperty
+        */
+       public String getToolProperty() {
+               return _toolProperty;
+       }
+
+       /**
+        * Set the toolProperty.
+        * @param toolProperty the toolProperty to set
+        */
+       public void setToolProperty(final String toolProperty) {
+               _toolProperty = toolProperty;
+       }
+       
+       /**
+        * Get the leftMenuProperty.
+        * @return the leftMenuProperty
+        */
+       public String getLeftMenuProperty() {
+               return _leftMenuProperty;
+       }
+
+       /**
+        * Set the leftMenuProperty.
+        * @param leftMenuProperty the leftMenuProperty to set
+        */
+       public void setLeftMenuProperty(final String leftMenuProperty) {
+               _leftMenuProperty = leftMenuProperty;
+       }
 }
\ No newline at end of file