package org.splat.simer;
+
/**
*
* @author Daniel Brunier-Coulin
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