]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/StampFacade.java
Salome HOME
Modifications to respect PMD rules.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / StampFacade.java
index 481133fe6aeb3415f18846bbf777c85413e2f6e8..368f1daa20b3ea619c39c643f2f4f5496c169bd3 100644 (file)
@@ -1,4 +1,5 @@
 package org.splat.simer;
+
 /**
  * 
  * @author    Daniel Brunier-Coulin
@@ -11,66 +12,72 @@ import java.util.ResourceBundle;
 import org.splat.dal.bo.som.Timestamp;
 import org.splat.dal.bo.som.ValidationStep;
 
-
 public class StampFacade implements HistoryFacade {
 
-    private String  icon;
-    private String  comment;
-    private String  date;
-    private String  empty;
-    private String  nonicon;
-
-//  ==============================================================================================================================
-//  Constructor
-//  ==============================================================================================================================
-
-    public StampFacade (Timestamp stamp) {
-//  ------------------------------------
-      ResourceBundle    labels  = ResourceBundle.getBundle("labels", ApplicationSettings.getCurrentLocale());
-      ResourceBundle    custom  = ResourceBundle.getBundle("som", ApplicationSettings.getCurrentLocale());
-         SimpleDateFormat  convert = new SimpleDateFormat(custom.getString("date.format"));  // Date display format
-         ValidationStep    type    = stamp.getType();
-
-      nonicon = "image.hold.gif";
-      empty   = "";
-      date    = convert.format(stamp.getDate());
-      comment = labels.getString("label." + type.toString()) + " " + stamp.getAuthor().toString();
-      if      (type == ValidationStep.APPROVAL)  icon = "icon.APPROVED.png";
-      else if (type == ValidationStep.REVIEW)    icon = "icon.inCHECK.png";
-      else if (type == ValidationStep.PROMOTION) icon = "icon.inDRAFT.png";
-      else                                       icon = "icon.inWORK.png";
-    }
-
-//  ==============================================================================================================================
-//  Getters
-//  ==============================================================================================================================
-
-    public String getDate () {
-//  ------------------------
-      return date;
-    }
-    public String getDescription () {
-//  -------------------------------
-      return comment;
-    }
-    public String getFileIcon () {
-//  ----------------------------
-      return icon;
-    }
-    public String getSharingIcon () {
-//  -------------------------------
-      return nonicon;
-    }
-    public String getSize () {
-//  ------------------------
-      return empty;
-    }
-    public String getVersion () {
-//  ---------------------------
-      return empty;
-    }
-    public String getVersioningIcon () {
-//  ----------------------------------
-      return nonicon;
-    }
+       private transient String _icon;
+       private transient final String _comment;
+       private transient final String _date;
+       private transient final String _empty;
+       private transient final String _nonicon;
+
+       // ==============================================================================================================================
+       // Constructor
+       // ==============================================================================================================================
+
+       public StampFacade(final Timestamp stamp) {
+               ResourceBundle labels = ResourceBundle.getBundle("labels",
+                               ApplicationSettings.getCurrentLocale());
+               ResourceBundle custom = ResourceBundle.getBundle("som",
+                               ApplicationSettings.getCurrentLocale());
+               SimpleDateFormat convert = new SimpleDateFormat(custom
+                               .getString("date.format")); // Date display format
+               ValidationStep type = stamp.getType();
+
+               _nonicon = "image.hold.gif";
+               _empty = "";
+               _date = convert.format(stamp.getDate());
+               _comment = labels.getString("label." + type.toString()) + " "
+                               + stamp.getAuthor().toString();
+               if (type == ValidationStep.APPROVAL) {
+                       _icon = "icon.APPROVED.png";
+               } else if (type == ValidationStep.REVIEW) {
+                       _icon = "icon.inCHECK.png";
+               } else if (type == ValidationStep.PROMOTION) {
+                       _icon = "icon.inDRAFT.png";
+               } else {
+                       _icon = "icon.inWORK.png";
+               }
+       }
+
+       // ==============================================================================================================================
+       // Getters
+       // ==============================================================================================================================
+
+       public String getDate() {
+               return _date;
+       }
+
+       public String getDescription() {
+               return _comment;
+       }
+
+       public String getFileIcon() {
+               return _icon;
+       }
+
+       public String getSharingIcon() {
+               return _nonicon;
+       }
+
+       public String getSize() {
+               return _empty;
+       }
+
+       public String getVersion() {
+               return _empty;
+       }
+
+       public String getVersioningIcon() {
+               return _nonicon;
+       }
 }
\ No newline at end of file