]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/service/dto/SimulationContextFacade.java
Salome HOME
Modifications done to respect PMD rules. Versioning a document is fixed. Validation...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / dto / SimulationContextFacade.java
index 77475ed2668a504c9992de767a9a626947d4d65d..07b5de1349eadc6e7083efb5230eb6738b713c79 100644 (file)
@@ -3,44 +3,45 @@ package org.splat.service.dto;
 import java.util.Iterator;
 import java.util.List;
 
-import org.splat.service.technical.ProjectSettingsService;
 import org.splat.dal.bo.som.ProgressState;
 import org.splat.dal.bo.som.SimulationContext;
 import org.splat.dal.bo.som.SimulationContextType;
+import org.splat.service.technical.ProjectSettingsService;
 
 public class SimulationContextFacade {
 
-       private SimulationContext my;
-       private String name;
-       private int at;
-       private ProgressState state;
+       private transient final SimulationContext _my;
+       private transient final String _name;
+       private transient int _at;
+       private transient ProgressState _state;
 
        // ==============================================================================================================================
        // Constructor
        // ==============================================================================================================================
 
-       public SimulationContextFacade(SimulationContext represented,
-                       List<ProjectSettingsService.Step> steps) {
+       public SimulationContextFacade(final SimulationContext represented,
+                       final List<ProjectSettingsService.Step> steps) {
                // --------------------------------------------------------------
                SimulationContextType mytype;
 
-               my = represented;
-               mytype = my.getType();
+               _my = represented;
+               mytype = _my.getType();
                for (Iterator<ProjectSettingsService.Step> i = steps.iterator(); i
                                .hasNext();) {
                        ProjectSettingsService.Step step = i.next();
-                       if (!mytype.isAttachedTo(step))
+                       if (!mytype.isAttachedTo(step)) {
                                continue;
-                       at = step.getNumber(); // There is no direct service for getting the step number
+                       }
+                       _at = step.getNumber(); // There is no direct service for getting the step number
                        break;
                }
-               name = my.getType().getName();
+               _name = _my.getType().getName();
                if (mytype.isApproved()) {
-                       state = ProgressState.inCHECK;
+                       _state = ProgressState.inCHECK;
                        // RKV: TODO: Do translation in presentation layer by struts tools: name = ResourceBundle.getBundle("som",
                        // ApplicationSettings.getCurrentLocale()).getString("type.context." + name);
                } else {
-                       state = ProgressState.inDRAFT;
+                       _state = ProgressState.inDRAFT;
                }
        }
 
@@ -50,28 +51,28 @@ public class SimulationContextFacade {
 
        public String getEditIcon() {
                // ----------------------------
-               StringBuffer result = new StringBuffer("icon.ed").append(state).append(
+               StringBuffer result = new StringBuffer("icon.ed").append(_state).append(
                                ".png");
                return result.toString();
        }
 
        public String getIndex() {
                // -------------------------
-               return String.valueOf(my.getIndex());
+               return String.valueOf(_my.getIndex());
        }
 
        public int getStepNumber() {
                // ---------------------------
-               return at;
+               return _at;
        }
 
        public String getTypeName() {
                // ----------------------------
-               return name;
+               return _name;
        }
 
        public String getValue() {
                // -------------------------
-               return my.getValue();
+               return _my.getValue();
        }
 }
\ No newline at end of file