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 fr.paris.lutece.portal.web.includes;
35
36 import java.util.Collections;
37 import java.util.HashMap;
38 import java.util.List;
39 import java.util.Map;
40
41 import fr.paris.lutece.portal.service.plugin.PluginDefaultImplementation;
42
43 public final class LinksIncludeTestPlugin extends PluginDefaultImplementation
44 {
45
46 private Map<Integer, List<String>> _listCssStyleSheets = new HashMap<>( );
47 private Map<Integer, List<String>> _listJavascriptFiles = new HashMap<>( );
48 private boolean _cssStyleSheetsScopePortal;
49 private boolean _cssStylesheetsScopeXPage;
50 private boolean _javascriptFilesScopePortal;
51 private boolean _javascriptFilesScopeXPage;
52
53 @Override
54 public List<String> getCssStyleSheets( )
55 {
56 List<String> res = _listCssStyleSheets.get( null );
57
58 if ( res == null )
59 {
60 return Collections.emptyList( );
61 }
62
63 return res;
64 }
65
66 @Override
67 public List<String> getCssStyleSheets( int mode )
68 {
69 List<String> res = _listCssStyleSheets.get( mode );
70
71 if ( res == null )
72 {
73 return Collections.emptyList( );
74 }
75
76 return res;
77 }
78
79 @Override
80 public List<String> getJavascriptFiles( )
81 {
82 List<String> res = _listJavascriptFiles.get( null );
83
84 if ( res == null )
85 {
86 return Collections.emptyList( );
87 }
88
89 return res;
90 }
91
92 @Override
93 public List<String> getJavascriptFiles( int mode )
94 {
95 List<String> res = _listJavascriptFiles.get( mode );
96
97 if ( res == null )
98 {
99 return Collections.emptyList( );
100 }
101
102 return res;
103 }
104
105 public void setCssStyleSheetsScopePortal( boolean bScope )
106 {
107 _cssStyleSheetsScopePortal = bScope;
108 }
109
110 @Override
111 public boolean isCssStylesheetsScopePortal( )
112 {
113 return _cssStyleSheetsScopePortal;
114 }
115
116 public void setCssStylesheetsScopeXPage( boolean bScope )
117 {
118 _cssStylesheetsScopeXPage = bScope;
119 }
120
121 @Override
122 public boolean isCssStylesheetsScopeXPage( )
123 {
124 return _cssStylesheetsScopeXPage;
125 }
126
127 public void setJavascriptFilesScopePortal( boolean bScope )
128 {
129 _javascriptFilesScopePortal = bScope;
130 }
131
132 @Override
133 public boolean isJavascriptFilesScopePortal( )
134 {
135 return _javascriptFilesScopePortal;
136 }
137
138 public void setJavascriptFilesScopeXPage( boolean bScope )
139 {
140 _javascriptFilesScopeXPage = bScope;
141 }
142
143 @Override
144 public boolean isJavascriptFilesScopeXPage( )
145 {
146 return _javascriptFilesScopeXPage;
147 }
148
149 public void setCssStyleSheets( int mode, List<String> styleSheets )
150 {
151 _listCssStyleSheets.put( mode, styleSheets );
152 }
153
154 public void setCssStyleSheets( List<String> styleSheets )
155 {
156 _listCssStyleSheets.put( null, styleSheets );
157 }
158
159 public void setJavascriptFiles( int mode, List<String> javascriptFiles )
160 {
161 _listJavascriptFiles.put( mode, javascriptFiles );
162 }
163
164 public void setJavascriptFiles( List<String> javascriptFiles )
165 {
166 _listJavascriptFiles.put( null, javascriptFiles );
167 }
168
169 }