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.plugins.forms.modules.documentproducer.service;
35
36 import fr.paris.lutece.plugins.forms.modules.documentproducer.business.producerconfig.ConfigProducer;
37 import fr.paris.lutece.plugins.forms.modules.documentproducer.business.producerconfig.ConfigProducerHome;
38 import fr.paris.lutece.plugins.forms.modules.documentproducer.business.producerconfig.DocumentType;
39 import fr.paris.lutece.portal.service.plugin.Plugin;
40
41 import java.util.ArrayList;
42 import java.util.List;
43 import java.util.Locale;
44
45
46
47
48
49 public class ConfigProducerService
50 {
51
52
53
54
55
56
57
58
59
60
61 public void addNewConfig( Plugin plugin, ConfigProducer configProducer, List<Integer> listIdEntry )
62 {
63 ConfigProducerHome.addNewConfig( plugin, configProducer, listIdEntry );
64 }
65
66
67
68
69
70
71
72
73
74
75 public ConfigProducer loadConfig( Plugin plugin, int nIdConfig )
76 {
77 return ConfigProducerHome.loadConfig( plugin, nIdConfig );
78 }
79
80
81
82
83
84
85
86
87
88
89 public List<ConfigProducer> loadListProducerConfig( Plugin plugin, int nIdForms )
90 {
91 return ConfigProducerHome.loadListProducerConfig( plugin, nIdForms );
92 }
93
94
95
96
97
98
99
100
101
102
103 public List<Integer> loadListConfigQuestion( Plugin plugin, int nIdConfig )
104 {
105 if ( ( nIdConfig == -1 ) || ( nIdConfig == 0 ) )
106 {
107 return new ArrayList<>( );
108 }
109
110 return ConfigProducerHome.loadListConfigQuestion( plugin, nIdConfig );
111 }
112
113
114
115
116
117
118
119
120
121 public void deleteProducerConfig( Plugin plugin, int nIdConfigProducer )
122 {
123 ConfigProducerHome.deleteProducerConfig( plugin, nIdConfigProducer );
124 }
125
126
127
128
129
130
131
132
133
134
135
136 public void modifyProducerConfig( Plugin plugin, ConfigProducer configProducer, List<Integer> listIdEntry )
137 {
138 ConfigProducerHome.modifyProducerConfig( plugin, configProducer, listIdEntry );
139 }
140
141
142
143
144
145
146
147
148
149
150
151 public void copyProducerConfig( Plugin plugin, int nIdConfig, Locale locale )
152 {
153 ConfigProducerHome.copyProducerConfig( plugin, nIdConfig, locale );
154 }
155
156
157
158
159
160
161
162
163
164
165
166 public ConfigProducer loadDefaultConfig( Plugin plugin, int nIdForms, DocumentType docType )
167 {
168 return ConfigProducerHome.loadDefaultConfig( plugin, nIdForms, docType );
169 }
170
171
172
173
174
175
176
177
178
179
180 public List<ConfigProducer> loadDefaultConfigList( Plugin plugin, int nIdForms )
181 {
182 return ConfigProducerHome.loadDefaultConfigList( plugin, nIdForms );
183 }
184
185
186
187
188
189
190
191
192
193
194
195
196 public void createDefaultConfig( Plugin plugin, int nIdForms, int nIdConfig, DocumentType docType )
197 {
198 ConfigProducerHome.createDefaultConfig( plugin, nIdForms, nIdConfig, docType );
199 }
200
201
202
203
204
205
206
207
208
209
210
211
212 public void updateDefaultConfig( Plugin plugin, int nIdForms, int nIdConfig, DocumentType docType )
213 {
214 ConfigProducerHome.updateDefaultConfig( plugin, nIdForms, nIdConfig, docType );
215 }
216
217
218
219
220
221
222
223
224
225 public void removeAllDefaultConfigByIdForm( Plugin plugin, int nIdForm )
226 {
227 ConfigProducerHome.removeAllDefaultConfigOfForm( plugin, nIdForm );
228 }
229 }