1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.user.pref;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.hr.core.KPMEConstants;
20 import org.kuali.hr.time.util.TKUtils;
21 import org.kuali.hr.time.util.TkConstants;
22 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
23
24 public class UserPreferences extends PersistableBusinessObjectBase {
25 public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "UserPreferences";
26
27
28
29 private static final long serialVersionUID = 1L;
30 private String principalId;
31 private String timezone;
32
33 public UserPreferences(){}
34
35 public UserPreferences(String principalId, String timeZone){
36 this.principalId = principalId;
37 this.timezone = timeZone;
38 }
39
40 public void setTimezone(String timezone) {
41 this.timezone = timezone;
42 }
43
44 public String getTimezone() {
45 if (StringUtils.isEmpty(timezone))
46 return TKUtils.getSystemTimeZone();
47
48 return timezone;
49 }
50
51 public String getPrincipalId() {
52 return principalId;
53 }
54
55 public void setPrincipalId(String principalId) {
56 this.principalId = principalId;
57 }
58
59 }