1 package org.kuali.ole.deliver.notice.bo;
2
3 import org.apache.commons.collections.CollectionUtils;
4 import org.kuali.ole.alert.document.OlePersistableBusinessObjectBase;
5 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
6
7 import java.util.ArrayList;
8 import java.util.Iterator;
9 import java.util.List;
10
11
12
13
14 public class OleNoticeContentConfigurationBo extends OlePersistableBusinessObjectBase {
15 private String oleNoticeContentConfigurationId;
16 private String noticeType;
17 private String noticeName;
18 private String noticeTitle;
19 private String noticeBody;
20 private String noticeFooterBody;
21 private String noticeSubjectLine;
22 private boolean active;
23 private List<OleNoticeFieldLabelMapping> oleNoticeFieldLabelMappings = new ArrayList<OleNoticeFieldLabelMapping>();
24 private List<OleNoticeFieldLabelMapping> oleNoticePatronFieldLabelMappings = new ArrayList<OleNoticeFieldLabelMapping>();
25 private List<OleNoticeFieldLabelMapping> oleNoticeItemFieldLabelMappings = new ArrayList<OleNoticeFieldLabelMapping>();
26
27 public String getOleNoticeContentConfigurationId() {
28 return oleNoticeContentConfigurationId;
29 }
30
31 public void setOleNoticeContentConfigurationId(String oleNoticeContentConfigurationId) {
32 this.oleNoticeContentConfigurationId = oleNoticeContentConfigurationId;
33 }
34
35 public String getNoticeType() {
36 return noticeType;
37 }
38
39 public void setNoticeType(String noticeType) {
40 this.noticeType = noticeType;
41 }
42
43 public String getNoticeName() {
44 return noticeName;
45 }
46
47 public void setNoticeName(String noticeName) {
48 this.noticeName = noticeName;
49 }
50
51 public String getNoticeTitle() {
52 return noticeTitle;
53 }
54
55 public void setNoticeTitle(String noticeTitle) {
56 this.noticeTitle = noticeTitle;
57 }
58
59 public String getNoticeBody() {
60 return noticeBody;
61 }
62
63 public void setNoticeBody(String noticeBody) {
64 this.noticeBody = noticeBody;
65 }
66
67 public String getNoticeSubjectLine() {
68 return noticeSubjectLine;
69 }
70
71 public void setNoticeSubjectLine(String noticeSubjectLine) {
72 this.noticeSubjectLine = noticeSubjectLine;
73 }
74
75 public boolean isActive() {
76 return active;
77 }
78
79 public void setActive(boolean active) {
80 this.active = active;
81 }
82
83 public List<OleNoticeFieldLabelMapping> getOleNoticeFieldLabelMappings() {
84 return oleNoticeFieldLabelMappings;
85 }
86
87 public void setOleNoticeFieldLabelMappings(List<OleNoticeFieldLabelMapping> oleNoticeFieldLabelMappings) {
88 this.oleNoticeFieldLabelMappings = oleNoticeFieldLabelMappings;
89 }
90
91
92
93 public String getFieldLabel(String key) {
94 if (CollectionUtils.isNotEmpty(oleNoticeFieldLabelMappings)) {
95 for (Iterator<OleNoticeFieldLabelMapping> iterator = oleNoticeFieldLabelMappings.iterator(); iterator.hasNext(); ) {
96 OleNoticeFieldLabelMapping oleNoticeFieldLabelMapping = iterator.next();
97 if (oleNoticeFieldLabelMapping.getFieldName().equalsIgnoreCase(key)){
98 return oleNoticeFieldLabelMapping.getFieldLabel();
99 }
100 }
101 }
102 return key;
103 }
104
105 public String getNoticeFooterBody() {
106 return noticeFooterBody;
107 }
108
109 public void setNoticeFooterBody(String noticeFooterBody) {
110 this.noticeFooterBody = noticeFooterBody;
111 }
112
113 public List<OleNoticeFieldLabelMapping> getOleNoticePatronFieldLabelMappings() {
114 return oleNoticePatronFieldLabelMappings;
115 }
116
117 public void setOleNoticePatronFieldLabelMappings(List<OleNoticeFieldLabelMapping> oleNoticePatronFieldLabelMappings) {
118 this.oleNoticePatronFieldLabelMappings = oleNoticePatronFieldLabelMappings;
119 }
120
121 public List<OleNoticeFieldLabelMapping> getOleNoticeItemFieldLabelMappings() {
122 return oleNoticeItemFieldLabelMappings;
123 }
124
125 public void setOleNoticeItemFieldLabelMappings(List<OleNoticeFieldLabelMapping> oleNoticeItemFieldLabelMappings) {
126 this.oleNoticeItemFieldLabelMappings = oleNoticeItemFieldLabelMappings;
127 }
128 }