1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package info.magnolia.module.templatingkit.templates.pages;
35
36 import info.magnolia.module.templatingkit.resources.Resource;
37 import info.magnolia.module.templatingkit.style.CssFile;
38 import info.magnolia.module.templatingkit.templates.ExtrasArea;
39 import info.magnolia.module.templatingkit.templates.FooterArea;
40 import info.magnolia.module.templatingkit.templates.Header;
41 import info.magnolia.module.templatingkit.templates.MainArea;
42 import info.magnolia.module.templatingkit.templates.STKTemplateAvailability;
43 import info.magnolia.module.templatingkit.templates.SiteNavigation;
44 import info.magnolia.rendering.template.AreaDefinition;
45 import info.magnolia.rendering.template.configured.ConfiguredTemplateDefinition;
46
47 import java.util.ArrayList;
48 import java.util.List;
49
50
51
52
53
54
55
56
57 public class STKPage extends ConfiguredTemplateDefinition {
58
59 private SiteNavigation navigation;
60
61 private String bodyID;
62
63 private String category = "content";
64
65 private String subcategory;
66
67 private String bodyClass;
68
69 private List<Resource> jsFiles = new ArrayList<Resource>();
70
71 private List<CssFile> cssFiles = new ArrayList<CssFile>();
72
73 public STKPage() {
74 setTemplateAvailability(new STKTemplateAvailability());
75 }
76
77
78
79
80
81
82 public AreaDefinition getArea(String key) {
83 return this.getAreas().get(key);
84 }
85
86
87
88
89
90
91
92 public ExtrasArea getExtrasArea() {
93 return (ExtrasArea) this.getAreas().get("extras");
94 }
95
96 public String getBodyID() {
97 return bodyID;
98 }
99
100 public void setBodyID(String bodyID) {
101 this.bodyID = bodyID;
102 }
103
104 public String getBodyClass() {
105 return this.bodyClass;
106 }
107
108 public void setBodyClass(String bodyClass) {
109 this.bodyClass = bodyClass;
110 }
111
112 public SiteNavigation getNavigation() {
113 return this.navigation;
114 }
115
116 public void setNavigation(SiteNavigation navigation) {
117 this.navigation = navigation;
118 }
119
120 public String getCategory() {
121 return this.category;
122 }
123
124 public void setCategory(String category) {
125 this.category = category;
126 }
127
128 public String getSubcategory() {
129 return this.subcategory;
130 }
131
132 public void setSubcategory(String subcategory) {
133 this.subcategory = subcategory;
134 }
135
136 public List<Resource> getJsFiles() {
137 return this.jsFiles;
138 }
139
140 public void setJsFiles(List<Resource> jsFiles) {
141 this.jsFiles = jsFiles;
142 }
143
144 public void addJsFile(Resource jsFile) {
145 this.jsFiles.add(jsFile);
146 }
147
148 public List<CssFile> getCssFiles() {
149 return this.cssFiles;
150 }
151
152 public void setCssFiles(List<CssFile> cssFiles) {
153 this.cssFiles = cssFiles;
154 }
155
156 public void addCssFile(CssFile cssFile) {
157 this.cssFiles.add(cssFile);
158 }
159
160
161
162
163
164 public void setHeader(Header header) {
165 this.getAreas().put("header", header);
166 }
167
168
169
170
171 public FooterArea getFooter() {
172 return (FooterArea) this.getAreas().get("footer");
173 }
174
175
176
177
178 public void setFooter(FooterArea footer) {
179 this.getAreas().put("footer", footer);
180 }
181
182
183
184
185 public Header getHeader() {
186 return (Header) this.getAreas().get("header");
187 }
188
189
190
191 public void setExtrasArea(ExtrasArea extras) {
192 this.getAreas().put("extras", extras);
193 }
194
195
196
197
198 public MainArea getMainArea() {
199 return (MainArea) this.getAreas().get("main");
200 }
201
202
203
204
205 public void setMainArea(MainArea main) {
206 this.getAreas().put("main", main);
207 }
208
209
210
211
212 public AreaDefinition getPromosArea() {
213 return this.getAreas().get("promos");
214 }
215
216
217
218
219 public void setPromosArea(AreaDefinition promos) {
220 this.getAreas().put("promos", promos);
221 }
222
223
224
225
226 public AreaDefinition getBaseArea() {
227 return this.getAreas().get("base");
228 }
229
230
231
232
233 public void setBaseArea(AreaDefinition base) {
234 this.getAreas().put("base", base);
235 }
236
237
238
239
240 public AreaDefinition getHtmlHeader() {
241 return this.getAreas().get("htmlHeader");
242 }
243
244
245
246
247 public void setHtmlHeader(AreaDefinition htmlHeader) {
248 this.getAreas().put("htmlHeader", htmlHeader);
249 }
250
251
252
253
254 public AreaDefinition getBreadcrumb() {
255 return this.getAreas().get("breadcrumb");
256 }
257
258
259
260
261 public void setBreadcrumb(AreaDefinition breadcrumb) {
262 this.getAreas().put("breadcrumb", breadcrumb);
263 }
264
265
266
267
268 public AreaDefinition getPlatformArea() {
269 return this.getAreas().get("platform");
270 }
271
272
273
274
275 public void setPlatformArea(AreaDefinition platform) {
276 this.getAreas().put("platform", platform);
277 }
278 }