View Javadoc
1   /*
2    * Copyright (c) 2002-2021, 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.workflow.modules.rest.util.constants;
35  
36  /**
37   *
38   * WorkflowRestConstants
39   *
40   */
41  public final class WorkflowRestConstants
42  {
43      // CONSTANTS
44      public static final String SLASH = "/";
45  
46      // PATHS
47      public static final String PATH_WADL = "wadl";
48      public static final String PATH_ID_WORKFLOW = "{id_workflow}";
49      public static final String PATH_STATE = "/state";
50      public static final String PATH_ID_STATE = "{id_state}";
51      public static final String PATH_ACTION = "/action";
52      public static final String PATH_ID_ACTION = "{id_action}";
53      public static final String PATH_RESOURCE_WORKFLOW = "/resource_workflow";
54      public static final String PATH_ID_RESOURCE = "{id_resource}";
55      public static final String PATH_RESOURCE_TYPE = "{resource_type}";
56      public static final String PATH_DO = "do";
57      public static final String PATH_WORKFLOW = "workflow";
58  
59      // TAGS
60      public static final String TAG_WORKFLOWS = "workflows";
61      public static final String TAG_WORKFLOW = "workflow";
62      public static final String TAG_ID_WORKFLOW = "id-workflow";
63      public static final String TAG_NAME = "name";
64      public static final String TAG_DESCRIPTION = "description";
65      public static final String TAG_CREATION_DATE = "creation-date";
66      public static final String TAG_IS_ENABLE = "is-enable";
67      public static final String TAG_WORKGROUP_KEY = "workgroup-key";
68      public static final String TAG_STATES = "states";
69      public static final String TAG_STATE = "state";
70      public static final String TAG_ID_STATE = "id-state";
71      public static final String TAG_ID_ACTION = "id-action";
72      public static final String TAG_IS_INITIAL_STATE = "is-initial-state";
73      public static final String TAG_IS_REQUIRED_WORKGROUP_ASSIGNED = "is-required-workgroup-assigned";
74      public static final String TAG_ACTIONS = "actions";
75      public static final String TAG_ACTION = "action";
76      public static final String TAG_ID_STATE_BEFORE = "id-state-before";
77      public static final String TAG_ID_STATE_AFTER = "id-state-after";
78      public static final String TAG_IS_AUTOMATIC_STATE = "is-automatic-state";
79      public static final String TAG_IS_MASS_ACTION = "is-mass-action";
80      public static final String TAG_RESOURCE_WORKFLOWS = "resource-workflows";
81      public static final String TAG_RESOURCE_WORKFLOW = "resource-workflow";
82      public static final String TAG_ID_RESOURCE = "id-resource";
83      public static final String TAG_RESOURCE_TYPE = "resource-type";
84      public static final String TAG_ID_EXTERNAL_PARENT = "id-external-parent";
85      public static final String TAG_WORKGROUPS = "workgroups";
86      public static final String TAG_IS_ASSOCIATED_WITH_WORKGROUP = "is-associated-with-workgroup";
87      public static final String TAG_ACTION_RESULTS = "action-results";
88      public static final String TAG_ACTION_RESULT = "action-result";
89      public static final String TAG_IS_SUCCESSFUL = "is-successful";
90      public static final String TAG_MESSAGE = "message";
91  
92      // PARAMETERS
93      public static final String PARAMETER_ID_WORKFLOW = "id_workflow";
94      public static final String PARAMETER_ID_STATE = "id_state";
95      public static final String PARAMETER_ID_ACTION = "id_action";
96      public static final String PARAMETER_ID_RESOURCE = "id_resource";
97      public static final String PARAMETER_RESOURCE_TYPE = "resource_type";
98  
99      // MARKS
100     public static final String MARK_BASE_URL = "base_url";
101 
102     // MESSAGES
103     public static final String MESSAGE_SUCCESS = "SUCCESS";
104     public static final String MESSAGE_ERROR_WORKFLOW_NOT_AVAILABLE = "ERROR : Workflow not available";
105     public static final String MESSAGE_ERROR_ACTION_NEEDS_INTERMEDIATE_STEP = "ERROR : The action needs an intermediate step";
106     public static final String MESSAGE_ERROR_ACTION_NONEXISTENT = "ERROR : The action does not exist";
107     public static final String MESSAGE_ERROR_RESOURCE_NONEXISTENT = "ERROR : The resource does not exist";
108     public static final String MESSAGE_ERROR_RESOURCE_STATE = "ERROR : The resource is not in the correct state to perform the action";
109 
110     // TEMPLATES
111     public static final String TEMPLATE_WADL = "admin/plugins/workflow/modules/rest/wadl.xml";
112 
113     /**
114      * Private constructor
115      */
116     private WorkflowRestConstants( )
117     {
118     }
119 }