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.business.resourceenhancer;
35
36 import fr.paris.lutece.portal.service.spring.SpringContextService;
37
38 import java.util.List;
39 import java.util.Map;
40
41 import javax.servlet.http.HttpServletRequest;
42
43
44
45
46 public final class ResourceEnhancer
47 {
48
49
50
51 private ResourceEnhancer( )
52 {
53
54 }
55
56
57
58
59
60
61
62
63
64
65
66
67
68 public static void getXmlAddOn( StringBuffer strXml, String strResourceType, int nResourceId )
69 {
70 List<IResourceDisplayManager> managers = SpringContextService.getBeansOfType( IResourceDisplayManager.class );
71
72 for ( IResourceDisplayManager manager : managers )
73 {
74 manager.getXmlAddOn( strXml, strResourceType, nResourceId );
75 }
76 }
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92 public static void buildPageAddOn( Map<String, Object> model, String strResourceType, int nIdResource, String strPortletId, HttpServletRequest request )
93 {
94 List<IResourceDisplayManager> managers = SpringContextService.getBeansOfType( IResourceDisplayManager.class );
95
96 for ( IResourceDisplayManager manager : managers )
97 {
98 manager.buildPageAddOn( model, strResourceType, nIdResource, strPortletId, request );
99 }
100 }
101
102
103
104
105
106
107
108
109
110 public static void getCreateResourceModelAddOn( Map<String, Object> model )
111 {
112 List<IResourceManager> managers = SpringContextService.getBeansOfType( IResourceManager.class );
113
114 for ( IResourceManager manager : managers )
115 {
116 manager.getCreateResourceModelAddOn( model );
117 }
118 }
119
120
121
122
123
124
125
126
127
128
129
130 public static void doCreateResourceAddOn( HttpServletRequest request, String strResourceType, int nResourceId )
131 {
132 List<IResourceManager> managers = SpringContextService.getBeansOfType( IResourceManager.class );
133
134 for ( IResourceManager manager : managers )
135 {
136 manager.doCreateResourceAddOn( request, strResourceType, nResourceId );
137 }
138 }
139
140
141
142
143
144
145
146
147
148
149
150 public static void getModifyResourceModelAddOn( Map<String, Object> model, String strResourceType, int nResourceId )
151 {
152 List<IResourceManager> managers = SpringContextService.getBeansOfType( IResourceManager.class );
153
154 for ( IResourceManager manager : managers )
155 {
156 manager.getModifyResourceModelAddOn( model, strResourceType, nResourceId );
157 }
158 }
159
160
161
162
163
164
165
166
167
168
169
170 public static void doModifyResourceAddOn( HttpServletRequest request, String strResourceType, int nResourceId )
171 {
172 List<IResourceManager> managers = SpringContextService.getBeansOfType( IResourceManager.class );
173
174 for ( IResourceManager manager : managers )
175 {
176 manager.doModifyResourceAddOn( request, strResourceType, nResourceId );
177 }
178 }
179
180
181
182
183
184
185
186
187
188
189
190 public static void doDeleteResourceAddOn( HttpServletRequest request, String strResourceType, int nResourceId )
191 {
192 List<IResourceManager> managers = SpringContextService.getBeansOfType( IResourceManager.class );
193
194 for ( IResourceManager manager : managers )
195 {
196 manager.doDeleteResourceAddOn( request, strResourceType, nResourceId );
197 }
198 }
199
200
201
202
203
204
205
206
207
208
209
210 public static void doDownloadResourceAddOn( HttpServletRequest request, String strResourceType, int nResourceId )
211 {
212 List<IResourceManager> managers = SpringContextService.getBeansOfType( IResourceManager.class );
213
214 for ( IResourceManager manager : managers )
215 {
216 manager.doDownloadResourceAddOn( request, strResourceType, nResourceId );
217 }
218 }
219 }