View Javadoc
1   /*
2    * Copyright (c) 2002-2022, City of Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  package fr.paris.lutece.plugins.dansmarue.modules.rest.util.constants;
35  
36  /**
37   * SiraRestConstants.
38   */
39  public class SiraRestConstants
40  {
41  
42      /** The Constant PATH_WADL. */
43      // CONSTANTS
44      public static final String PATH_WADL = "wadl";
45  
46      /** The Constant PATH_API. */
47      public static final String PATH_API = "API";
48  
49      /** The Constant PATH_SIGNALEMENT_API. */
50      public static final String PATH_SIGNALEMENT_API = "signalement/api";
51  
52      /** The Constant PATH_IDENTITY_STORE. */
53      public static final String PATH_IDENTITY_STORE = "identitystore";
54  
55      /** The Constant PATH_TEST_GET. */
56      public static final String PATH_TEST_GET = "test_get";
57  
58      /** The Constant SLASH. */
59      public static final String SLASH = "/";
60  
61      /** The Constant WORKFLOW_RAMEN_RESOURCE_TYPE. */
62      public static final String WORKFLOW_RAMEN_RESOURCE_TYPE = "RAMEN_DOSSIER";
63  
64      /** The Constant WORKFLOW_RAMEN_ID. */
65      public static final int WORKFLOW_RAMEN_ID = 1;
66  
67      /** The Constant WORKFLOW_SIGNALEMENT_ID. */
68      public static final int WORKFLOW_SIGNALEMENT_ID = 2;
69  
70      /** The Constant WORKFLOW_SIGNALEMENT_RESOURCE_TYPE. */
71      public static final String WORKFLOW_SIGNALEMENT_RESOURCE_TYPE = "SIGNALEMENT_SIGNALEMENT";
72  
73      /** The Constant ID_ACTION_SERVICE_FAIT_RAMEN_PLANIFIE. */
74      public static final int ID_ACTION_SERVICE_FAIT_RAMEN_PLANIFIE = 5;
75  
76      /** The Constant ID_ACTION_SERVICE_FAIT_RAMEN_PRIS_COMPTE. */
77      public static final int ID_ACTION_SERVICE_FAIT_RAMEN_PRIS_COMPTE = 30;
78  
79      /** The Constant ID_ACTION_SERVICE_FAIT_RAMEN_REPLANIFIE. */
80      public static final int ID_ACTION_SERVICE_FAIT_RAMEN_REPLANIFIE = 34;
81  
82      /** The Constant ID_ACTION_SERVICE_FAIT_RAMEN_CLANDESTIN. */
83      public static final int ID_ACTION_SERVICE_FAIT_RAMEN_CLANDESTIN = 46;
84  
85      /** The Constant ID_ACTION_SERVICE_FAIT_SIGNALEMENT_A_TRAITER. */
86      public static final int ID_ACTION_SERVICE_FAIT_SIGNALEMENT_A_TRAITER = 18;
87  
88      /** The Constant ID_ACTION_SERVICE_FAIT_SIGNALEMENT_PROGRAMME. */
89      public static final int ID_ACTION_SERVICE_FAIT_SIGNALEMENT_PROGRAMME = 22;
90  
91      /** The Constant ID_STATE_PLANIFIE. */
92      public static final int ID_STATE_PLANIFIE = 2;
93  
94      /** The Constant ID_STATE_PRIS_COMPTE. */
95      public static final int ID_STATE_PRIS_COMPTE = 3;
96  
97      /** The Constant ID_STATE_REPLANIFIE. */
98      public static final int ID_STATE_REPLANIFIE = 14;
99  
100     /** The Constant ID_STATE_A_TRAITER. */
101     public static final int ID_STATE_A_TRAITER = 8;
102 
103     /** The Constant ID_STATE_PROGRAMME. */
104     public static final int ID_STATE_PROGRAMME = 9;
105 
106     /** The Constant NO_ERROR_0. */
107     public static final int NO_ERROR_0 = 0;
108 
109     /** The Constant ERROR_1. */
110     public static final int ERROR_1 = 1;
111 
112     /** The Constant JSON_TAG_REQUEST. */
113     // JSON TAG
114     public static final String JSON_TAG_REQUEST = "request";
115 
116     /** The Constant JSON_TAG_ERROR. */
117     public static final String JSON_TAG_ERROR = "error";
118 
119     /** The Constant JSON_TAG_ANSWER. */
120     public static final String JSON_TAG_ANSWER = "answer";
121 
122     /** The Constant JSON_TAG_STATUS. */
123     public static final String JSON_TAG_STATUS = "status";
124 
125     /** The Constant JSON_TAG_CLOSEST_INCIDENTS. */
126     public static final String JSON_TAG_CLOSEST_INCIDENTS = "closest_incidents";
127 
128     /** The Constant JSON_TAG_INCIDENT. */
129     public static final String JSON_TAG_INCIDENT = "incident";
130 
131     /** The Constant JSON_TAG_POSITION. */
132     public static final String JSON_TAG_POSITION = "position";
133 
134     /** The Constant JSON_TAG_LATITUDE. */
135     public static final String JSON_TAG_LATITUDE = "latitude";
136 
137     /** The Constant JSON_TAG_LONGITUDE. */
138     public static final String JSON_TAG_LONGITUDE = "longitude";
139 
140     /** The Constant JSON_TAG_RESOLVED_INCIDENTS. */
141     public static final String JSON_TAG_RESOLVED_INCIDENTS = "resolved_incidents";
142 
143     /** The Constant JSON_TAG_ONGOING_INCIDENTS. */
144     public static final String JSON_TAG_ONGOING_INCIDENTS = "ongoing_incidents";
145 
146     /** The Constant JSON_TAG_UPDATED_INCIDENTS. */
147     public static final String JSON_TAG_UPDATED_INCIDENTS = "updated_incidents";
148 
149     /** The Constant JSON_TAG_INCIDENT_PICTURE. */
150     public static final String JSON_TAG_INCIDENT_PICTURE = "incident_picture";
151 
152     /** The Constant JSON_TAG_GUID. */
153     public static final String JSON_TAG_GUID = "guid";
154 
155     /** The Constant ERROR_EMPTY_JSON_REQUEST. */
156     // ERROR CODES
157     public static final int ERROR_EMPTY_JSON_REQUEST = 1;
158 
159     /** The Constant ERROR_BAD_JSON_REQUEST. */
160     public static final int ERROR_BAD_JSON_REQUEST = 2;
161 
162     /** The Constant ERROR_BAD_REQUEST_SUB_ELEMENT. */
163     public static final int ERROR_BAD_REQUEST_SUB_ELEMENT = 3;
164 
165     /** The Constant ERROR_EMPTY_DEVICE_ID. */
166     public static final int ERROR_EMPTY_DEVICE_ID = 4;
167 
168     /** The Constant ERROR_BAD_DEVICE_ID. */
169     public static final int ERROR_BAD_DEVICE_ID = 5;
170 
171     /** The Constant ERROR_EMPTY_POSITION_PARAMETER. */
172     public static final int ERROR_EMPTY_POSITION_PARAMETER = 6;
173 
174     /** The Constant ERROR_BAD_POSITION_PARAMETER. */
175     public static final int ERROR_BAD_POSITION_PARAMETER = 7;
176 
177     /** The Constant ERROR_BAD_CATEGORY_ID_PARAMETER. */
178     public static final int ERROR_BAD_CATEGORY_ID_PARAMETER = 8;
179 
180     /** The Constant ERROR_EMPTY_CATEGORY_ID_PARAMETER. */
181     public static final int ERROR_EMPTY_CATEGORY_ID_PARAMETER = 9;
182 
183     /** The Constant ERROR_BAD_ADDRESS_PARAMETER. */
184     public static final int ERROR_BAD_ADDRESS_PARAMETER = 90;
185 
186     /** The Constant ERROR_ANY_INCIDENT_FOR_USER. */
187     public static final int ERROR_ANY_INCIDENT_FOR_USER = 10;
188 
189     /** The Constant ERROR_EMPTY_INCIDENT_ID. */
190     public static final int ERROR_EMPTY_INCIDENT_ID = 11;
191 
192     /** The Constant ERROR_BAD_INCIDENT_ID. */
193     public static final int ERROR_BAD_INCIDENT_ID = 12;
194 
195     /** The Constant ERROR_BAD_USER_ID. */
196     public static final int ERROR_BAD_USER_ID = 13;
197 
198     /** The Constant ERROR_EMPTY_USER_ID. */
199     public static final int ERROR_EMPTY_USER_ID = 14;
200 
201     /** The Constant ERROR_EMPTY_INCIDENT_ID_BIS. */
202     public static final int ERROR_EMPTY_INCIDENT_ID_BIS = 15;
203 
204     /** The Constant ERROR_BAD_INCIDENT_ID_BIS. */
205     public static final int ERROR_BAD_INCIDENT_ID_BIS = 16;
206 
207     /** The Constant ERROR_ALREADY_RESOLVED. */
208     public static final int ERROR_ALREADY_RESOLVED = 17;
209 
210     /** The Constant ERROR_ALREADY_CONFIRM. */
211     public static final int ERROR_ALREADY_CONFIRM = 18;
212 
213     /** The Constant ERROR_ALREADY_INVALID. */
214     public static final int ERROR_ALREADY_INVALID = 19;
215 
216     /** The Constant ERROR_BAD_PICTURE. */
217     public static final int ERROR_BAD_PICTURE = 29;
218 
219     /** The Constant ERROR_IMPOSSIBLE_READ_PICTURE. */
220     public static final int ERROR_IMPOSSIBLE_READ_PICTURE = 30;
221 
222     /** The Constant ERROR_API_REST. */
223     public static final int ERROR_API_REST = 32;
224 
225     /** The Constant ERROR_SIGN_RESTQUEST. */
226     public static final int ERROR_SIGN_RESTQUEST = 33;
227 
228     /** The Constant JSON_TAG_LOG_INCIDENT_ID. */
229     // JSON TAG FOR LOG
230     public static final String JSON_TAG_LOG_INCIDENT_ID = "incidentId";
231 
232     /** The Constant JSON_TAG_LOG_UDID. */
233     public static final String JSON_TAG_LOG_UDID = "udid";
234 
235     /** The Constant JSON_TAG_LOG_DATE. */
236     public static final String JSON_TAG_LOG_DATE = "date";
237 
238     /** The Constant JSON_TAG_LOG_STATUS. */
239     public static final String JSON_TAG_LOG_STATUS = "status";
240 
241     /** The Constant JSON_TAG_ERROR_ERROR. */
242     // JSON TAG FOR ERROR RAMEN
243     public static final String JSON_TAG_ERROR_ERROR = "error";
244 
245     /** The Constant JSON_TAG_ERROR_MESSAGE. */
246     public static final String JSON_TAG_ERROR_MESSAGE = "error_message";
247 
248     /** The Constant REQUEST_TYPE_ENCOMBRANTS. */
249     // REQUEST TYPES
250     public static final String REQUEST_TYPE_ENCOMBRANTS = "ramenTypesEncombrants";
251 
252     /** The Constant REQUEST_ENTITY_HIERARCHY. */
253     public static final String REQUEST_ENTITY_HIERARCHY = "entityHierarchy";
254 
255     /** The Constant REQUEST_FEUILLE_DE_ROUTE. */
256     public static final String REQUEST_FEUILLE_DE_ROUTE = "ramenFeuilleDeRoute";
257 
258     /** The Constant REQUEST_RAMEN_POSTER_FAIT. */
259     public static final String REQUEST_RAMEN_POSTER_FAIT = "ramenPosterFait";
260 
261     /** The Constant JSON_TAG_DOSSIER_LIST. */
262     public static final String JSON_TAG_DOSSIER_LIST = "dossierList";
263 
264     /** The Constant JSON_TAG_DOSSIEROBJ_ID. */
265     // JSON TAG FOR DOSSIER OBJ
266     public static final String JSON_TAG_DOSSIEROBJ_ID = "id";
267 
268     /** The Constant JSON_TAG_DOSSIEROBJ_NUMBER. */
269     public static final String JSON_TAG_DOSSIEROBJ_NUMBER = "number";
270 
271     /** The Constant JSON_TAG_DOSSIEROBJ_TYPE. */
272     public static final String JSON_TAG_DOSSIEROBJ_TYPE = "type";
273 
274     /** The Constant JSON_TAG_DOSSIEROBJ_TYPENAME. */
275     public static final String JSON_TAG_DOSSIEROBJ_TYPENAME = "typename";
276 
277     /** The Constant JSON_TAG_DOSSIEROBJ_PRIORITY. */
278     public static final String JSON_TAG_DOSSIEROBJ_PRIORITY = "priority";
279 
280     /** The Constant JSON_TAG_DOSSIEROBJ_QUANTITY. */
281     public static final String JSON_TAG_DOSSIEROBJ_QUANTITY = "quantity";
282 
283     /** The Constant JSON_TAG_DOSSIEROBJ_QUANTITIES. */
284     public static final String JSON_TAG_DOSSIEROBJ_QUANTITIES = "quantities";
285 
286     /** The Constant JSON_TAG_DOSSIEROBJ_ADDRESS. */
287     public static final String JSON_TAG_DOSSIEROBJ_ADDRESS = "adress";
288 
289     /** The Constant JSON_TAG_DOSSIEROBJ_DATE. */
290     public static final String JSON_TAG_DOSSIEROBJ_DATE = "date";
291 
292     /** The Constant JSON_TAG_DOSSIEROBJ_LATITUDE. */
293     public static final String JSON_TAG_DOSSIEROBJ_LATITUDE = "latitude";
294 
295     /** The Constant JSON_TAG_DOSSIEROBJ_LONGITUDE. */
296     public static final String JSON_TAG_DOSSIEROBJ_LONGITUDE = "longitude";
297 
298     /** The Constant JSON_TAG_DOSSIEROBJ_PRECISION. */
299     public static final String JSON_TAG_DOSSIEROBJ_PRECISION = "precision";
300 
301     /** The Constant JSON_TAG_DOSSIEROBJ_PICTURE. */
302     public static final String JSON_TAG_DOSSIEROBJ_PICTURE = "picture";
303 
304     /** The Constant JSON_TAG_DOSSIEROBJ_DESCRIPTION. */
305     public static final String JSON_TAG_DOSSIEROBJ_DESCRIPTION = "description";
306 
307     /** The Constant JSON_TAG_NOMENCLATURE. */
308     public static final String JSON_TAG_NOMENCLATURE = "nomenclature";
309 
310     /** The Constant JSON_TAG_ROUND. */
311     public static final String JSON_TAG_ROUND = "round";
312 
313     /** The Constant JSON_TAG_FEUILLE_ROUTE. */
314     public static final String JSON_TAG_FEUILLE_ROUTE = "feuilleDeRoute";
315 
316     /** The Constant JSON_TAG_ENCOMBRANT_ID. */
317     // JSON TAG FOR ENCOMBRANT
318     public static final String JSON_TAG_ENCOMBRANT_ID = "id";
319 
320     /** The Constant JSON_TAG_ENCOMBRANT_NAME. */
321     public static final String JSON_TAG_ENCOMBRANT_NAME = "name";
322 
323     /** The Constant JSON_TAG_ENCOMBRANT_IMAGE_URL. */
324     public static final String JSON_TAG_ENCOMBRANT_IMAGE_URL = "picture";
325 
326     /** The Constant JSON_TAG_ENCOMBRANT_FORBIDDEN. */
327     public static final String JSON_TAG_ENCOMBRANT_FORBIDDEN = "isForbidden";
328 
329     /** The Constant JSON_TAG_RAMEN_TYPES_LIST. */
330     public static final String JSON_TAG_RAMEN_TYPES_LIST = "RamentypesList";
331 
332     /** The Constant JSON_TAG_RAMEN_TYPE_OBJET. */
333     public static final String JSON_TAG_RAMEN_TYPE_OBJET = "ramenType";
334 
335     /** The Constant JSON_TAG_ENCOMBRANT_QUANTITY. */
336     public static final String JSON_TAG_ENCOMBRANT_QUANTITY = "quantity";
337 
338     /** The Constant JSON_TAG_UNIT_ID. */
339     // JSON TAG FOR UNIT
340     public static final String JSON_TAG_UNIT_ID = "id";
341 
342     /** The Constant JSON_TAG_UNIT_NAME. */
343     public static final String JSON_TAG_UNIT_NAME = "name";
344 
345     /** The Constant JSON_TAG_CHILDREN_NAME. */
346     public static final String JSON_TAG_CHILDREN_NAME = "children";
347 
348     /** The Constant JSON_TAG_ENTITY. */
349     public static final String JSON_TAG_ENTITY = "entity";
350 
351     /** The Constant JSON_TAG_INCIDENT_ENCOMBRANTS. */
352     // JSON TAG FOR INCIDENT
353     public static final String JSON_TAG_INCIDENT_ENCOMBRANTS = "encombrants";
354 
355     /** The Constant JSON_TAG_NAME. */
356     // JSON TAG FOR MON COMPTE
357     public static final String JSON_TAG_NAME = "name";
358 
359     /** The Constant JSON_TAG_FIRSTNAME. */
360     public static final String JSON_TAG_FIRSTNAME = "firstname";
361 
362     /** The Constant JSON_TAG_MAIL. */
363     public static final String JSON_TAG_MAIL = "mail";
364 
365     /** The Constant JSON_TAG_USER. */
366     public static final String JSON_TAG_USER = "user";
367 
368     /** The Constant PARAMETERS_JSON_STREAM. */
369     // PARAMETERS
370     public static final String PARAMETERS_JSON_STREAM = "jsonStream";
371 
372     /** The Constant PARAMETER_NOMENCLATURE_RAMEN. */
373     public static final String PARAMETER_NOMENCLATURE_RAMEN = "nomenclature";
374 
375     /** The Constant PROPERTY_DEFAULT_CATEGORY_ID. */
376     // PROPERTIES
377     public static final String PROPERTY_DEFAULT_CATEGORY_ID = "ramen-rest.default.category.id";
378 
379     /** The Constant PROPERTY_DESCRIPTION_MESSAGE_DOSSIER. */
380     public static final String PROPERTY_DESCRIPTION_MESSAGE_DOSSIER = "ramen-rest.description.dossier";
381 
382     /** The Constant PROPERTY_PRIVATE_KEY_ANDROID_API. */
383     public static final String PROPERTY_PRIVATE_KEY_ANDROID_API = "signalement-rest.private.key.android_api";
384 
385     /** The Constant PROPERTY_ACTIVATION_SIGNREQUEST. */
386     public static final String PROPERTY_ACTIVATION_SIGNREQUEST = "signalement-rest.signrequest.activation";
387 
388     /** The Constant PROPERTY_URL_PICTURE. */
389     public static final String PROPERTY_URL_PICTURE = "sira-rest.url_picture";
390 
391     /** The Constant PROPERTY_URL_DOSSIER_PICTURE. */
392     public static final String PROPERTY_URL_DOSSIER_PICTURE = "sira-rest.dossier.picture";
393 
394     /** The Constant MSG_DOSSIER_RAMEN_ALIAS. */
395     public static final String MSG_DOSSIER_RAMEN_ALIAS = "module.dansmarue.rest.dossier.alias";
396 
397     /** The Constant MARK_BASE_URL. */
398     // MARK
399     public static final String MARK_BASE_URL = "base_url";
400 
401     /** The Constant TEMPLATE_WADL. */
402     // TEMPLATES
403     public static final String TEMPLATE_WADL = "admin/plugins/signalement/modules/rest/wadl.xml";
404 
405     /** The Constant HEADER_X_APP_VERSION. */
406     // HTTP Headers
407     public static final String HEADER_X_APP_VERSION = "x-app-version";
408 
409     /** The Constant HEADER_X_APP_PLATFORM. */
410     public static final String HEADER_X_APP_PLATFORM = "x-app-platform";
411 
412     /** The Constant HEADER_X_APP_DEVICE_MODEL. */
413     public static final String HEADER_X_APP_DEVICE_MODEL = "x-app-device-model";
414 
415     /** The Constant HEADER_X_APP_REQUEST_SIGNATURE. */
416     public static final String HEADER_X_APP_REQUEST_SIGNATURE = "x-app-request-signature";
417 
418     /**
419      * Instantiates a new sira rest constants.
420      */
421     private SiraRestConstants( )
422     {
423 
424     }
425 }