Salome HOME
Modifications to respect PMD rules.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / EditDocumentAction.java
index 955e65b9734cd3e88ea9779ab20f3b08c06c2535..1cac34a80b9289b57fc7a7c5eefcd77887fe48ab 100644 (file)
@@ -86,7 +86,7 @@ public class EditDocumentAction extends DisplayStudyStepAction {
         * @return SUCCESS
         */
        public String doInitialize() {
-               mystudy = getOpenStudy();
+               _openStudy = getOpenStudy();
                
                setMenuProperty("study");
                setTitleProperty("study");
@@ -114,10 +114,10 @@ public class EditDocumentAction extends DisplayStudyStepAction {
                initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
 
                try {
-                       mystudy = getOpenStudy();
+                       _openStudy = getOpenStudy();
 
-                       Execute todo = Execute.valueOf(action);
-                       Step step = mystudy.getSelectedStep();
+                       Execute todo = Execute.valueOf(_action);
+                       Step step = _openStudy.getSelectedStep();
                        Publication doc = step.getDocument(Integer.valueOf(index));
 
                        if (todo == Execute.renameDocument) {
@@ -125,26 +125,26 @@ public class EditDocumentAction extends DisplayStudyStepAction {
                                // Useless to update the document presentation
                        } else if (todo == Execute.accept) {
                                getPublicationService().actualize(doc);
-                               mystudy.update(doc);
+                               _openStudy.update(doc);
                        } else if (todo == Execute.promote) {
                                getPublicationService().promote(doc,
                                                Calendar.getInstance().getTime());
-                               mystudy.update(doc);
+                               _openStudy.update(doc);
                        } else if (todo == Execute.demote) {
                                getPublicationService().demote(doc);
-                               mystudy.update(doc);
+                               _openStudy.update(doc);
                        } else if (todo == Execute.review) {
                                getPublicationService().review(doc,
                                                Calendar.getInstance().getTime());
-                               mystudy.update(doc);
+                               _openStudy.update(doc);
                        } else if (todo == Execute.invalidate) {
                                getPublicationService().invalidate(doc);
-                               mystudy.update(doc);
+                               _openStudy.update(doc);
                        } else if (todo == Execute.approve) {
                                getPublicationService().approve(doc,
                                                Calendar.getInstance().getTime());
-                               mystudy.update(doc);
-                               mystudy.getMenu().refreshSelectedItem(); // Updates the menu icon, in case of other documents in approved state
+                               _openStudy.update(doc);
+                               _openStudy.getMenu().refreshSelectedItem(); // Updates the menu icon, in case of other documents in approved state
                        }
                        return SUCCESS;
                } catch (RuntimeException saverror) {
@@ -169,9 +169,9 @@ public class EditDocumentAction extends DisplayStudyStepAction {
 
                try {
                        // Getting user inputs
-                       mystudy = getOpenStudy();
+                       _openStudy = getOpenStudy();
                        User user = getConnectedUser();
-                       Step step = mystudy.getSelectedStep();
+                       Step step = _openStudy.getSelectedStep();
                        File updir = getRepositoryService().getDownloadDirectory(user);
                        File upfile = new File(updir.getPath() + "/" + filename);
                        String[] parse = filename.split("\\x2E");
@@ -184,7 +184,7 @@ public class EditDocumentAction extends DisplayStudyStepAction {
                                                + updir.getPath() + "\".");
                        upfile.renameTo(export.getTo().asFile());
 
-                       mystudy.update(edited);
+                       _openStudy.update(edited);
                        return SUCCESS;
                } catch (Exception error) {
                        LOG.error("Reason:", error);
@@ -205,14 +205,14 @@ public class EditDocumentAction extends DisplayStudyStepAction {
                initializationFullScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty, _leftMenuProperty);
 
                try {
-                       mystudy = getOpenStudy();
+                       _openStudy = getOpenStudy();
 
-                       Step step = mystudy.getSelectedStep();
+                       Step step = _openStudy.getSelectedStep();
                        Publication doctag = step.getDocument(Integer.valueOf(index));
 
                        getStepService().removeDocument(step, doctag); // Updates the data structure
 
-                       mystudy.remove(doctag); // Updates the presentation
+                       _openStudy.remove(doctag); // Updates the presentation
                        return SUCCESS;
                } catch (RuntimeException saverror) {
                        LOG.error("Reason:", saverror);