Fix the comments
[so.git] / adapters / mso-vfc-adapter / src / main / java / org / openecomp / mso / adapters / vfc / constant / CommonConstant.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20 package org.openecomp.mso.adapters.vfc.constant;
21
22 /**
23  * CommonConstant
24  * <br>
25  * <p>
26  * </p>
27  * 
28  * @author
29  * @version     ONAP Amsterdam Release  2017-08-28
30  */
31 public class CommonConstant {
32     
33     public static final String STR_EMPTY = "";
34
35     public static final String NFVO_CREATE_URL = "/openoapi/nslcm/v1/ns";
36
37     public static final String NFVO_INSTANTIATE_URL = "/openoapi/nslcm/v1/ns/%s/instantiate";
38
39     public static final String NFVO_TERMINATE_URL = "/openoapi/nslcm/v1/ns/%s/terminate";
40
41     public static final String NFVO_DELETE_URL = "/openoapi/nslcm/v1/ns/%s";
42
43     public static final String NFVO_QUERY_URL = "/openoapi/nslcm/v1/jobs/%s";
44
45
46     public static final String LEFT_QUOTE_LEFT_BRACE = "\"\\{";
47
48     public static final String LEFT_BRACE = "\\{";
49
50     public static final String RIGHT_BRACE_RIGHT_QUOTE = "\\}\"";
51
52     public static final String RIGHT_BRACE = "\\}";
53
54     public static final String LEFT_QUOTE_LEFT_BRACKET = "\"\\[";
55
56     public static final String LEFT_BRACKET = "\\[";
57
58     public static final String RIGHT_BRACKET_RIGHT_QUOTE = "\\]\"";
59
60     public static final String RIGHT_BRACKET = "\\]";
61
62     /**
63      * HttpContext constant
64      * <br>
65      * <p>
66      * </p>
67      * 
68      * @author
69      * @version     ONAP Amsterdam Release  2017-08-28
70      */
71     public static class HttpContext {
72
73         public static final String CONTENT_TYPE = "Content-Type";
74
75         public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
76
77         public static final String URL = "url";
78
79         public static final String METHOD_TYPE = "methodType";
80
81         public static final String IP = "ip";
82
83         public static final String PORT = "port";
84
85         public static final String RAW_DATA = "rawData";
86
87         private HttpContext() {
88
89         }
90     }
91
92     /**
93      * 
94      * <br>
95      * <p>
96      * </p>
97      * 
98      * @author
99      * @version     ONAP Amsterdam Release  2017-08-28
100      */
101     public static class MethodType {
102
103         public static final String POST = "post";
104
105         public static final String DELETE = "delete";
106
107         public static final String PUT = "put";
108
109         public static final String GET = "get";
110
111         private MethodType() {
112
113         }
114     }
115
116     /**
117      * 
118      * <br>
119      * <p>
120      * </p>
121      * 
122      * @author
123      * @version     ONAP Amsterdam Release  2017-08-28
124      */
125     public static class Step {
126
127         public static final String CREATE = "create";
128
129         public static final String INSTANTIATE = "instantiate";
130
131         public static final String STATUS = "status";
132
133         public static final String TERMINATE = "terminate";
134
135         public static final String QUERY = "query";
136
137         public static final String DELETE = "delete";
138
139         private Step() {
140
141         }
142
143     }
144
145
146     public static final String NSD_ID = "nsdId";
147
148     public static final String NS_NAME = "nsName";
149
150     public static final String DESC = "description";
151
152     public static final String NS_INSTANCE_ID = "nsInstanceId";
153
154     public static final String JOB_ID = "jobId";
155
156     public static final String ADDITIONAL_PARAM_FOR_NS = "additionalParamForNs";
157
158     public static final String LOCAL_HOST = "localhost";
159
160     public static class StatusDesc {
161
162         public static final String INSTANTIATE_NS_FAILED = "instantiate ns failed";
163
164         public static final String QUERY_JOB_STATUS_FAILED = "query job status failed";
165
166         public static final String TERMINATE_NS_FAILED = "terminate ns failed";
167
168         public static final String DELETE_NS_FAILED = "delete ns failed";
169
170         public static final String CREATE_NS_FAILED = "create ns failed";
171
172         private StatusDesc() {
173
174         }
175     }
176     
177     private CommonConstant() {
178
179     }
180 }