Change: add OPEN-O seed code for VF-C
[vfc/nfvo/driver/vnfm/svnfm.git] / huawei / vnfmadapter / VnfmadapterService / service / src / main / java / org / openo / nfvo / vnfmadapter / service / constant / Constant.java
1 /*
2  * Copyright 2016-2017 Huawei Technologies Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.openo.nfvo.vnfmadapter.service.constant;
17
18 import java.util.Arrays;
19 import java.util.Collections;
20 import java.util.List;
21
22 /**
23  * Provide constant value
24  * <br/>
25  * <p>
26  * </p>
27  *
28  * @author
29  * @version NFVO 0.5 Sep 3, 2016
30  */
31 public class Constant {
32
33     public static final String POST = "post";
34
35     public static final String PUT = "put";
36
37     public static final String DELETE = "delete";
38
39     public static final String GET = "get";
40
41     public static final String ASYNCPOST = "asyncPost";
42
43     public static final String ASYNCGET = "asyncGet";
44
45     public static final String ASYNCPUT = "asyncPut";
46
47     public static final String ASYNCDELETE = "asyncDelete";
48
49     public static final String ENCODEING = "utf-8";
50
51     public static final String COOKIE = "Cookie";
52
53     public static final String ACCESSSESSION = "accessSession";
54
55     public static final String CONTENT_TYPE = "Content-Type";
56
57     public static final String APPLICATION = "application/json";
58
59     public static final String HEADER_SUBJECT_TOKEN = "X-Subject-Token";
60
61     public static final String HEADER_AUTH_TOKEN = "accessSession";
62
63     public static final String DOWNLOADCSAR_SUCCESS = "Success";
64
65     public static final int UNZIP_SUCCESS = 0;
66
67     public static final int UNZIP_FAIL = -1;
68
69     public static final String DOWNLOADCSAR_FAIL = "FAIL";
70
71     public static final int HTTP_OK = 200;
72
73     public static final int HTTP_CREATED = 201;
74
75     public static final int HTTP_ACCEPTED = 202;
76
77     public static final int HTTP_NOCONTENT = 204;
78
79     public static final int HTTP_BAD_REQUEST = 400;
80
81     public static final int HTTP_UNAUTHORIZED = 401;
82
83     public static final int HTTP_NOTFOUND = 404;
84
85     public static final int HTTP_NOT_ACCEPTABLE = 406;
86
87     public static final int HTTP_CONFLICT = 409;
88
89     public static final int HTTP_INVALID_PARAMETERS = 415;
90
91     public static final int HTTP_INNERERROR = 500;
92
93     public static final List<String> AUTHLIST = Collections.unmodifiableList(Arrays.asList(Constant.ANONYMOUS, Constant.CERTIFICATE));
94
95     public static final int INTERNAL_EXCEPTION = 600;
96
97     public static final int REPEAT_REG_TIME = 60 * 1000;
98
99     public static final int MIN_PWD_LENGTH = 6;
100
101     public static final int MAX_PWD_LENGTH = 160;
102
103     public static final int MIN_URL_LENGTH = 7;
104
105     public static final int MAX_VNFM_NAME_LENGTH = 64;
106
107     public static final int MIN_VNFM_NAME_LENGTH = 1;
108
109     public static final int MAX_URL_LENGTH = 256;
110
111     public static final int REST_SUCCESS = 1;
112
113     public static final int DEFAULT_COLLECTION_SIZE = 10;
114
115     public static final int REST_FAIL = -1;
116
117     public static final String ROARAND = "?roarand=%s";
118
119     public static final String ANONYMOUS = "Anonymous";
120
121     public static final String CERTIFICATE = "Certificate";
122
123     public static final String RETCODE = "retCode";
124
125     public static final String STATUS = "status";
126
127     public static final String VNFPKGINFO="vnfpkginfo.json";
128
129     public static final int ERROR_STATUS_CODE = -1;
130     
131     public static final String COLON=":";
132
133     private Constant() {
134         //private constructor
135     }
136 }