1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.fatwire.gst.foundation.wra;
17
18 import java.util.Date;
19
20 import com.fatwire.assetapi.data.AssetId;
21 import com.fatwire.gst.foundation.facade.assetapi.asset.TemplateAsset;
22
23
24
25
26
27
28
29 public class WraBeanImpl implements WebReferenceableAsset {
30 private AssetId id;
31 private String name;
32 private String description;
33 private String subtype;
34 private String status;
35 private String metaTitle;
36 private String metaDescription;
37 private String metaKeyword;
38 private String h1Title;
39 private String linkText;
40 private String path;
41 private String template;
42 private Date startDate;
43 private Date endDate;
44
45 public WraBeanImpl() {
46 }
47
48 public WraBeanImpl(TemplateAsset asset) {
49 id = asset.getAssetId();
50 name = asset.asString("name");
51 description = asset.asString("description");
52 subtype = asset.asString("subtype");
53 status = asset.asString("status");
54 metaTitle = asset.asString("metatitle");
55 metaDescription = asset.asString("metadescription");
56 metaKeyword = asset.asString("metakeyword");
57 h1Title = asset.asString("h1title");
58 linkText = asset.asString("linktext");
59 path = asset.asString("path");
60 template = asset.asString("template");
61 startDate = asset.asDate("startdate");
62 endDate = asset.asDate("enddate");
63 }
64
65 public WraBeanImpl(WebReferenceableAsset wra) {
66 id = wra.getId();
67 name = wra.getName();
68 description = wra.getDescription();
69 subtype = wra.getSubtype();
70 status = wra.getStatus();
71 metaTitle = wra.getMetaTitle();
72 metaDescription = wra.getMetaDescription();
73 metaKeyword = wra.getMetaKeyword();
74 h1Title = wra.getH1Title();
75 linkText = wra.getLinkText();
76 path = wra.getPath();
77 template = wra.getTemplate();
78 startDate = wra.getStartDate();
79 endDate = wra.getEndDate();
80 }
81
82 public AssetId getId() {
83 return id;
84 }
85
86 public void setId(AssetId id) {
87 this.id = id;
88 }
89
90 public String getName() {
91 return name;
92 }
93
94 public void setName(String name) {
95 this.name = name;
96 }
97
98 public String getDescription() {
99 return description;
100 }
101
102 public void setDescription(String description) {
103 this.description = description;
104 }
105
106 public String getSubtype() {
107 return subtype;
108 }
109
110 public void setSubtype(String subtype) {
111 this.subtype = subtype;
112 }
113
114 public String getStatus() {
115 return status;
116 }
117
118 public void setStatus(String status) {
119 this.status = status;
120 }
121
122 public String getMetaTitle() {
123 return metaTitle;
124 }
125
126 public void setMetaTitle(String metaTitle) {
127 this.metaTitle = metaTitle;
128 }
129
130 public String getMetaDescription() {
131 return metaDescription;
132 }
133
134 public void setMetaDescription(String metaDescription) {
135 this.metaDescription = metaDescription;
136 }
137
138 public String getMetaKeyword() {
139 return metaKeyword;
140 }
141
142 public void setMetaKeyword(String metaKeyword) {
143 this.metaKeyword = metaKeyword;
144 }
145
146 public String getH1Title() {
147 return h1Title;
148 }
149
150 public void setH1Title(String h1Title) {
151 this.h1Title = h1Title;
152 }
153
154 public String getLinkText() {
155 return linkText;
156 }
157
158 public void setLinkText(String linkText) {
159 this.linkText = linkText;
160 }
161
162 public String getPath() {
163 return path;
164 }
165
166 public void setPath(String path) {
167 this.path = path;
168 }
169
170 public String getTemplate() {
171 return template;
172 }
173
174 public void setTemplate(String template) {
175 this.template = template;
176 }
177
178 public Date getStartDate() {
179 return startDate;
180 }
181
182 public void setStartDate(Date startDate) {
183 this.startDate = startDate;
184 }
185
186 public Date getEndDate() {
187 return endDate;
188 }
189
190 public void setEndDate(Date endDate) {
191 this.endDate = endDate;
192 }
193
194 public String toString() {
195 return (getId() != null) ? getId().toString() : "[null id]";
196 }
197 }