Implement reconnection and ping-pong between cloud services. Make
[iotivity.git] / cloud / stack / src / main / java / org / iotivity / cloud / base / OICConstants.java
1 /*
2  * //******************************************************************
3  * //
4  * // Copyright 2016 Samsung Electronics All Rights Reserved.
5  * //
6  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7  * //
8  * // Licensed under the Apache License, Version 2.0 (the "License");
9  * // you may not use this file except in compliance with the License.
10  * // You may obtain a copy of the License at
11  * //
12  * //      http://www.apache.org/licenses/LICENSE-2.0
13  * //
14  * // Unless required by applicable law or agreed to in writing, software
15  * // distributed under the License is distributed on an "AS IS" BASIS,
16  * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * // See the License for the specific language governing permissions and
18  * // limitations under the License.
19  * //
20  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21  */
22 package org.iotivity.cloud.base;
23
24 public class OICConstants {
25     /*
26      * OCF version 1.0.0 default value for Accept Version and Content-Format
27      * Version
28      */
29     public static final int    DEFAULT_VERSION_VALUE         = 2048;
30
31     /* resource Interface for keep-alive */
32     public static final String DEFAULT_INTERFACE             = "oic.if.baseline";
33
34     public static final String LINK_INTERFACE                = "oic.if.ll";
35
36     public static final String PREFIX_OIC                    = "oic";
37
38     public static final String RS_INTERFACE                  = "if";
39
40     public static final String RS_RESOURCE_TYPE              = "rt";
41
42     /* resource url for account */
43     public static final String ACCOUNT_URI                   = "account";
44
45     public static final String SESSION_URI                   = "session";
46
47     public static final String DEVICE_URI                    = "device";
48
49     public static final String TOKEN_REFRESH_URI             = "tokenrefresh";
50
51     /* resource url for acl */
52     public static final String CREDPROV_URI                  = "credprov";
53
54     public static final String CERT_URI                      = "cert";
55
56     /* resource url for acl */
57     public static final String ACL_URI                       = "acl";
58
59     public static final String GROUP_URI                     = "group";
60
61     public static final String VERIFY_URI                    = "verify";
62
63     public static final String ID_URI                        = "id";
64
65     public static final String ROUTE_URI                     = "route";
66
67     public static final String INVITE_URI                    = "invite";
68
69     public static final String SEARCH_URI                    = "search";
70
71     /* resource uri to publish, update, delete resource info */
72     public static final String RD_URI                        = "rd";
73
74     /* resource uri for keep-alive */
75     public static final String KEEP_ALIVE_URI                = "ping";
76
77     /* resource uri to discover resource info */
78     public static final String WELL_KNOWN_URI                = "res";
79
80     /* resource uri for resource presence */
81     public static final String RES_PRESENCE_URI              = "ad";
82
83     /* resource uri for device presence */
84     public static final String DEVICE_PRESENCE_URI           = "prs";
85
86     /* resource uri for message queue */
87     public static final String MQ_BROKER_URI                 = "ps";
88     
89     /* file path for tls communication - Modify filePath to yours */
90     public static final String CERTS_PATH                    = "../certificate";
91
92     public static final String ROOT_CERT_FILE                = CERTS_PATH + "/rootca.crt";
93
94     public static final String CLOUD_CERT_FILE               = CERTS_PATH + "/iotivitycloud.crt";
95
96     public static final String CLOUD_KEY_FILE                = CERTS_PATH + "/iotivitycloud.key";
97
98     /* cloud uuid */
99     public static final String CLOUD_UUID                    = "2a6085d1-815d-4277-baba-4e4e4df91308";
100
101     public static final String ACCOUNT_FULL_URI              = "/"
102             + OICConstants.PREFIX_OIC + "/" + OICConstants.ACCOUNT_URI;
103
104     public static final String ACCOUNT_SEARCH_FULL_URI       = "/"
105             + OICConstants.PREFIX_OIC + "/" + OICConstants.ACCOUNT_URI + "/"
106             + OICConstants.SEARCH_URI;
107
108     public static final String ACCOUNT_SESSION_FULL_URI      = "/"
109             + OICConstants.PREFIX_OIC + "/" + OICConstants.ACCOUNT_URI + "/"
110             + OICConstants.SESSION_URI;
111
112     public static final String ACCOUNT_TOKENREFRESH_FULL_URI = "/"
113             + OICConstants.PREFIX_OIC + "/" + OICConstants.ACCOUNT_URI + "/"
114             + OICConstants.TOKEN_REFRESH_URI;
115
116     public static final String ACL_ID_FULL_URI               = "/"
117             + OICConstants.PREFIX_OIC + "/" + OICConstants.ACL_URI + "/"
118             + OICConstants.ID_URI;
119
120     public static final String ACL_VERIFY_FULL_URI           = "/"
121             + OICConstants.PREFIX_OIC + "/" + OICConstants.ACL_URI + "/"
122             + OICConstants.VERIFY_URI;
123
124     public static final String GROUP_FULL_URI                = "/"
125             + OICConstants.PREFIX_OIC + "/" + OICConstants.ACL_URI + "/"
126             + OICConstants.GROUP_URI;
127
128     public static final String INVITE_FULL_URI               = "/"
129             + OICConstants.PREFIX_OIC + "/" + OICConstants.ACL_URI + "/"
130             + OICConstants.INVITE_URI;
131
132     public static final String KEEP_ALIVE_FULL_URI           = "/" + PREFIX_OIC
133             + "/" + OICConstants.KEEP_ALIVE_URI;
134
135     public static final String ROUTE_FULL_URI                = "/" + PREFIX_OIC
136             + "/" + OICConstants.ROUTE_URI;
137
138     public static final String MQ_BROKER_FULL_URI            = "/"
139             + OICConstants.PREFIX_OIC + "/" + OICConstants.MQ_BROKER_URI;
140
141     public static final String RD_FULL_URI                   = "/"
142             + OICConstants.PREFIX_OIC + "/" + OICConstants.RD_URI;
143
144     public static final String WELL_KNOWN_FULL_URI           = "/"
145             + OICConstants.PREFIX_OIC + "/" + OICConstants.WELL_KNOWN_URI;
146
147     public static final String RESOURCE_PRESENCE_FULL_URI    = "/"
148             + OICConstants.PREFIX_OIC + "/" + OICConstants.RES_PRESENCE_URI;
149
150     public static final String DEVICE_PRESENCE_FULL_URI      = "/"
151             + OICConstants.PREFIX_OIC + "/" + OICConstants.DEVICE_PRESENCE_URI;
152
153     public static final String CREDPROV_CERT_FULL_URI        = "/" + PREFIX_OIC
154             + "/" + CREDPROV_URI + "/" + CERT_URI;
155 }