--- /dev/null
+package org.splat.simer;
+/**
+ *
+ * @author Daniel Brunier-Coulin
+ * @copyright OPEN CASCADE 2012
+ */
+
+import java.text.SimpleDateFormat;
+import java.util.ResourceBundle;
+
+import org.splat.som.Timestamp;
+import org.splat.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;
+ }
+}
\ No newline at end of file