1 package org.splat.simer;
4 * @author Daniel Brunier-Coulin
5 * @copyright OPEN CASCADE 2012
8 import java.text.SimpleDateFormat;
9 import java.util.ResourceBundle;
11 import org.splat.dal.bo.som.Timestamp;
12 import org.splat.dal.bo.som.ValidationStep;
15 public class StampFacade implements HistoryFacade {
18 private String comment;
21 private String nonicon;
23 // ==============================================================================================================================
25 // ==============================================================================================================================
27 public StampFacade (Timestamp stamp) {
28 // ------------------------------------
29 ResourceBundle labels = ResourceBundle.getBundle("labels", ApplicationSettings.getCurrentLocale());
30 ResourceBundle custom = ResourceBundle.getBundle("som", ApplicationSettings.getCurrentLocale());
31 SimpleDateFormat convert = new SimpleDateFormat(custom.getString("date.format")); // Date display format
32 ValidationStep type = stamp.getType();
34 nonicon = "image.hold.gif";
36 date = convert.format(stamp.getDate());
37 comment = labels.getString("label." + type.toString()) + " " + stamp.getAuthor().toString();
38 if (type == ValidationStep.APPROVAL) icon = "icon.APPROVED.png";
39 else if (type == ValidationStep.REVIEW) icon = "icon.inCHECK.png";
40 else if (type == ValidationStep.PROMOTION) icon = "icon.inDRAFT.png";
41 else icon = "icon.inWORK.png";
44 // ==============================================================================================================================
46 // ==============================================================================================================================
48 public String getDate () {
49 // ------------------------
52 public String getDescription () {
53 // -------------------------------
56 public String getFileIcon () {
57 // ----------------------------
60 public String getSharingIcon () {
61 // -------------------------------
64 public String getSize () {
65 // ------------------------
68 public String getVersion () {
69 // ---------------------------
72 public String getVersioningIcon () {
73 // ----------------------------------