Skip to content

Commit b3ae04c

Browse files
committed
document.write now removed from Spring template
1 parent a8890ea commit b3ae04c

23 files changed

Lines changed: 1242 additions & 844 deletions

File tree

gocwebtemplate-core/gocwebtemplate-core-base/src/main/java/goc/webtemplate/component/AbstractCoreBean.java

Lines changed: 771 additions & 478 deletions
Large diffs are not rendered by default.

gocwebtemplate-core/gocwebtemplate-core-base/src/main/java/goc/webtemplate/component/jsonentities/AppFooter.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
/**
1212
* Objects of this class are meant to be serialized to a JSON object to be passed
1313
* as parameter to the 'wet.builder.appFooter' JavaScript function in the template
14-
* pages.
14+
* pages.
1515
*/
16-
public class AppFooter implements Serializable {
16+
public class AppFooter implements Serializable, IFooter {
1717
private static final long serialVersionUID = 1L;
1818

19-
private String cdnEnv;
19+
private String cdnEnv;
2020
private String subTheme;
2121
private String localPath;
2222
private String footerPath;
@@ -25,13 +25,13 @@ public class AppFooter implements Serializable {
2525
private List<FooterLink> termsLink;
2626
private List<FooterLink> privacyLink;
2727
private boolean showFeatures;
28-
28+
2929
public AppFooter()
3030
{
3131
}
3232

3333
public AppFooter(String cdnEnv, String subTheme, String localPath, String footerPath,
34-
List<IFooterSection> footerSections, List<Link> contactLink,
34+
List<IFooterSection> footerSections, List<Link> contactLink,
3535
List<FooterLink> termsLink, List<FooterLink> privacyLink, boolean showFeatures) {
3636
this.cdnEnv = cdnEnv;
3737
this.subTheme = subTheme;
@@ -67,7 +67,7 @@ public String getLocalPath() {
6767
public void setLocalPath(String localPath) {
6868
this.localPath = localPath;
6969
}
70-
70+
7171
public String getFooterPath() {
7272
return footerPath;
7373
}
@@ -111,7 +111,7 @@ public void setPrivacyLink(List<FooterLink> privacyLink) {
111111
public boolean isShowFeatures() {
112112
return showFeatures;
113113
}
114-
114+
115115
public void setShowFeatures(boolean showFeatures) {
116116
this.showFeatures = showFeatures;
117117
}

gocwebtemplate-core/gocwebtemplate-core-base/src/main/java/goc/webtemplate/component/jsonentities/AppTop.java

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
/**
1818
* Objects of this class are meant to be serialized to a JSON object to be passed
1919
* as parameter to the 'wet.builder.appTop' JavaScript function in the template
20-
* pages.
21-
*
20+
* pages.
21+
*
2222
* NOTE: For v4.0.27+ we have to render AppTop differently depending on the theme,
23-
* GCIntranet has extra properties. So, see also AppTopGCIntranet at the
24-
* bottom of this file.
23+
* GCIntranet has extra properties. So, see also AppTopGCIntranet at the
24+
* bottom of this file.
2525
*/
26-
public class AppTop implements Serializable {
26+
public class AppTop implements Serializable, ITop {
2727
private static final long serialVersionUID = 1L;
28-
28+
2929
private String cdnEnv;
3030
private String subTheme;
3131
private String localPath;
32-
32+
3333
private List<Link> appName;
3434
private String menuPath;
3535
private List<SecMenuItem> menuLinks;
@@ -111,11 +111,11 @@ public void setLocalPath(String localPath) {
111111
public List<Link> getAppName() {
112112
return this.appName;
113113
}
114-
114+
115115
public void setAppName(List<Link> value) {
116116
this.appName = value;
117117
}
118-
118+
119119
public String getMenuPath() {
120120
return menuPath;
121121
}
@@ -187,11 +187,11 @@ public boolean isShowPreContent() {
187187
public void setShowPreContent(boolean showPreContent) {
188188
this.showPreContent = showPreContent;
189189
}
190-
190+
191191
public List<CustomSearch> getCustomSearch() {
192192
return this.customSearch;
193193
}
194-
194+
195195
public void setCustomSearch(List<CustomSearch> customSearch) {
196196
this.customSearch = customSearch;
197197
}
@@ -220,53 +220,52 @@ public void setHeaderMenu(HeaderMenu headerMenu) {
220220
this.headerMenu = headerMenu;
221221
}
222222

223-
224223
/**
225224
* For v4.0.27+ we have to render AppTop differently depending on the theme,
226225
* GCIntranet has extra properties.
227-
*
226+
*
228227
* This is the GCIntranet-specific implementation
229228
*/
230229
public static class AppTopGCIntranet extends AppTop
231230
{
232231
private static final long serialVersionUID = 1L;
233-
232+
234233
private List<IntranetTitle> intranetTitle;
235-
234+
236235
@SerializedName("GCToolsModal")
237236
private boolean gcToolsModal;
238-
237+
239238
public AppTopGCIntranet()
240239
{
241240
}
242241

243242
public AppTopGCIntranet(String cdnEnv, String subTheme, String localPath, List<Link> appName, String menuPath,
244243
List<SecMenuItem> menuLinks, List<LanguageLink> lngLinks, List<Link> signIn, List<Link> signOut, List<Link> appSettings,
245-
boolean search, List<Breadcrumb> breadcrumbs, boolean showPreContent, List<CustomSearch> customSearch, boolean topSecMenu,
244+
boolean search, List<Breadcrumb> breadcrumbs, boolean showPreContent, List<CustomSearch> customSearch, boolean topSecMenu,
246245
List<IntranetTitle> intranetTitle, boolean gcToolsModal) {
247-
246+
248247
super(cdnEnv, subTheme, localPath, appName, menuPath,
249248
menuLinks, lngLinks, signIn, signOut, appSettings,
250249
search, breadcrumbs, showPreContent, customSearch, topSecMenu, null, null);
251250

252251
this.intranetTitle = intranetTitle;
253252
this.gcToolsModal = gcToolsModal;
254253
}
255-
254+
256255
public List<IntranetTitle> getIntranetTitle() {
257256
return intranetTitle;
258257
}
259258

260259
public void setIntranetTitle(List<IntranetTitle> intranetTitle) {
261260
this.intranetTitle = intranetTitle;
262261
}
263-
262+
264263
public boolean getGcToolsModal() {
265264
return gcToolsModal;
266265
}
267-
266+
268267
public void setGcToolsModal(boolean value) {
269268
this.gcToolsModal = value;
270269
}
271-
}
270+
}
272271
}

gocwebtemplate-core/gocwebtemplate-core-base/src/main/java/goc/webtemplate/component/jsonentities/Footer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
/**
1414
* Objects of this class are meant to be serialized to a JSON object to be passed
1515
* as parameter to the 'wet.builder.footer' JavaScript function in the template
16-
* pages.
16+
* pages.
1717
*/
18-
public class Footer implements Serializable {
18+
public class Footer implements Serializable, IFooter {
1919
private static final long serialVersionUID = 1L;
2020

2121
private String cdnEnv;
@@ -82,7 +82,7 @@ public void setShowFooter(boolean showFooter) {
8282
public boolean isShowFeatures() {
8383
return showFeatures;
8484
}
85-
85+
8686
public void setShowFeatures(boolean showFeatures) {
8787
this.showFeatures = showFeatures;
8888
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package goc.webtemplate.component.jsonentities;
2+
3+
/**
4+
* Marks class as being a valid object to be passed in the CDTS "footer" function/parameter.
5+
*/
6+
public interface IFooter {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package goc.webtemplate.component.jsonentities;
2+
3+
/**
4+
* Marks class as being a valid object to be passed in the CDTS "preFooter" function/parameter.
5+
*/
6+
public interface IPreFooter {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package goc.webtemplate.component.jsonentities;
2+
3+
/**
4+
* Marks class as being a valid object to be passed in the CDTS "top" function/parameter.
5+
*/
6+
public interface ITop {
7+
}

gocwebtemplate-core/gocwebtemplate-core-base/src/main/java/goc/webtemplate/component/jsonentities/PreFooter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@
77
/**
88
* Objects of this class are meant to be serialized to a JSON object to be passed
99
* as parameter to the 'wet.builder.preFooter' JavaScript function in the template
10-
* pages.
10+
* pages.
1111
*/
12-
public class PreFooter implements Serializable {
12+
public class PreFooter implements Serializable, IPreFooter {
1313
private static final long serialVersionUID = 1L;
1414

1515
private String cdnEnv;
1616
private String versionIdentifier;
1717
private String dateModified;
1818
private boolean showPostContent;
19-
19+
2020
//NOTE: Custom serialization/adapter because value can be both boolean and string
2121
@JsonAdapter(goc.webtemplate.component.jsonentities.adapters.FeedbackLinkAdapter.class)
2222
private FeedbackLink showFeedback;
23-
23+
2424
//NOTE: Custom serialization/adapter because value can be both boolean and array of string
2525
@JsonAdapter(goc.webtemplate.component.jsonentities.adapters.ShareListAdapter.class)
2626
private ShareList showShare;
2727

2828
private String screenIdentifier;
29-
30-
29+
30+
3131
public PreFooter() {
3232
}
3333

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
package goc.webtemplate.component.jsonentities;
2+
3+
import java.io.Serializable;
4+
5+
import java.util.List;
6+
7+
import com.google.gson.annotations.SerializedName;
8+
9+
/**
10+
* Objects of this class are meant to be serialized to a JSON object to be
11+
* passed as parameter to the 'wet.builder.setup' JavaScript function in the
12+
* template pages.
13+
*/
14+
public class Setup implements Serializable {
15+
private static final long serialVersionUID = 1L;
16+
17+
public static enum Mode {
18+
@SerializedName("common")
19+
COMMON,
20+
@SerializedName("app")
21+
APP,
22+
@SerializedName("server")
23+
SERVER,
24+
@SerializedName("splash")
25+
SPLASH
26+
}
27+
28+
private String cdnEnv;
29+
private Mode mode;
30+
private SetupBase base;
31+
private ITop top;
32+
private IPreFooter preFooter;
33+
private IFooter footer;
34+
private SecMenu secmenu; //all lowercase to fit with CDTS parameter
35+
private Splash splash;
36+
private List<String> onCDTSPageFinalized;
37+
38+
public Setup() {
39+
}
40+
41+
public Setup(String cdnEnv, Mode mode, SetupBase base, ITop top, IPreFooter preFooter, IFooter footer, SecMenu secmenu,
42+
Splash splash, List<String> onCDTSPageFinalized) {
43+
this.cdnEnv = cdnEnv;
44+
this.mode = mode;
45+
this.base = base;
46+
this.top = top;
47+
this.preFooter = preFooter;
48+
this.footer = footer;
49+
this.secmenu = secmenu;
50+
this.splash = splash;
51+
this.onCDTSPageFinalized = onCDTSPageFinalized;
52+
}
53+
54+
public String getCdnEnv() {
55+
return cdnEnv;
56+
}
57+
58+
public void setCdnEnv(String cdnEnv) {
59+
this.cdnEnv = cdnEnv;
60+
}
61+
62+
public Mode getMode() {
63+
return this.mode;
64+
}
65+
66+
public void setMode(Mode value) {
67+
this.mode = value;
68+
}
69+
70+
public SetupBase getBase() {
71+
return this.base;
72+
}
73+
74+
public void setBase(SetupBase value) {
75+
this.base = value;
76+
}
77+
78+
public ITop getTop() {
79+
return top;
80+
}
81+
82+
public void setTop(ITop top) {
83+
this.top = top;
84+
}
85+
86+
public IPreFooter getPreFooter() {
87+
return preFooter;
88+
}
89+
90+
public void setPreFooter(IPreFooter preFooter) {
91+
this.preFooter = preFooter;
92+
}
93+
94+
public IFooter getFooter() {
95+
return footer;
96+
}
97+
98+
public void setFooter(IFooter footer) {
99+
this.footer = footer;
100+
}
101+
102+
public SecMenu getSecmenu() {
103+
return secmenu;
104+
}
105+
106+
public void setSecmenu(SecMenu secmenu) {
107+
this.secmenu = secmenu;
108+
}
109+
110+
public Splash getSplash() {
111+
return splash;
112+
}
113+
114+
public void setSplash(Splash splash) {
115+
this.splash = splash;
116+
}
117+
118+
public List<String> getOnCDTSPageFinalized() {
119+
return onCDTSPageFinalized;
120+
}
121+
122+
public void setOnCDTSPageFinalized(List<String> onCDTSPageFinalized) {
123+
this.onCDTSPageFinalized = onCDTSPageFinalized;
124+
}
125+
}

0 commit comments

Comments
 (0)