Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / service / simulator / java / eclipse-plugin / ServiceProviderPlugin / src / oic / simulator / serviceprovider / utils / Constants.java
1 /*
2  * Copyright 2015 Samsung Electronics All Rights Reserved.
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
17 package oic.simulator.serviceprovider.utils;
18
19 import org.oic.simulator.serviceprovider.AutomationType;
20
21 /**
22  * This class maintains all constants which are used throughout the service
23  * provider plug-in.
24  */
25 public class Constants {
26
27     public static final String         CONFIG_DIRECTORY_PATH            = "/resource";
28
29     public static final String         UNDERSCORE                       = "_";
30     public static final String         FORWARD_SLASH                    = "/";
31
32     public static final String         OIC_PREFIX                       = "/oic/r";
33     public static final String         SIMULATOR                        = "simulator";
34
35     public static final String         RESOURCE_URI                     = "Resource URI";
36     public static final String         RESOURCE_TYPE                    = "Resource Type";
37     public static final String         RESOURCE_UID                     = "Resource ID";
38     public static final String         CONNECTIVITY_TYPE                = "Connectivity Type";
39
40     public static final String[]       META_PROPERTIES                  = {
41             RESOURCE_URI, RESOURCE_TYPE, CONNECTIVITY_TYPE             };
42
43     public static final int            META_PROPERTY_COUNT              = META_PROPERTIES.length;
44
45     public static final String         ENABLE                           = "Enable";
46     public static final String         DISABLE                          = "Disable";
47     public static final String         ENABLED                          = "Enabled";
48     public static final String         DISABLED                         = "Disabled";
49
50     public static final String         AUTOMATION                       = "Automation";
51     public static final String         AUTOMATION_TYPE                  = "Automation Type";
52     public static final String         UPDATE_INTERVAL_IN_MS            = "Update Interval(ms)";
53
54     public static final String[]       AUTOMATION_SETTINGS              = {
55             AUTOMATION_TYPE, UPDATE_INTERVAL_IN_MS                     };
56
57     public static final int            AUTOMATION_SETTINGS_COUNT        = AUTOMATION_SETTINGS.length;
58
59     public static final String         START_RESOURCE_AUTOMATION        = "Start Automation";
60     public static final String         STOP_RESOURCE_AUTOMATION         = "Stop Automation";
61
62     public static final int            DISPLAY_RESOURCE_URI_TOKEN_COUNT = 2;
63
64     public static final AutomationType DEFAULT_AUTOMATION_TYPE          = AutomationType.NORMAL;
65
66     public static final int            DEFAULT_AUTOMATION_INTERVAL      = 500;
67
68     public static final int            PROPER_LOG_TIME_TOKEN_LENGTH     = 3;
69
70     public static final String[]       BROWSE_RAML_FILTER_EXTENSIONS    = new String[] { "*.raml" };
71     public static final String[]       SAVE_LOG_FILTER_EXTENSIONS       = new String[] {
72             "*.log", "*"                                               };
73
74     public static final int            LOG_SIZE                         = 1000;
75
76     public static final String         INFO_LOG                         = "info_log";
77     public static final String         WARNING_LOG                      = "warning_log";
78     public static final String         ERROR_LOG                        = "error_log";
79     public static final String         DEBUG_LOG                        = "debug_log";
80     public static final String         UNKNOWN_LOG                      = "unknown_log";
81
82     public static final String         INFO                             = "Info";
83     public static final String         WARNING                          = "Warning";
84     public static final String         ERROR                            = "Error";
85     public static final String         DEBUG                            = "Debug";
86     public static final String         UNKNOWN                          = "Unknown";
87
88     public static final String         CHECKED                          = "Checked";
89     public static final String         UNCHECKED                        = "Unchecked";
90     public static final String         NOTIFY_BUTTON_SELECTED           = "Notify_Selected";
91     public static final String         NOTIFY_BUTTON_UNSELECTED         = "Notify_Unselected";
92
93     public static final String         CREATE_PAGE_TITLE                = "Create Resource";
94     public static final String         CREATE_PAGE_MESSAGE              = "Select a standard resource or custom resource to be created";
95
96     public static final String         DELETE_PAGE_TITLE                = "Delete Resource";
97     public static final String         DELETE_PAGE_MESSAGE              = "Select the resource(s) to be deleted";
98
99     public static final String         RAML_FILE_PREFIX                 = "/resource/";
100
101     public static final String         RAML_FILE_EXTENSION              = ".raml";
102     public static final String         JSON_FILE_EXTENSION              = ".json";
103
104     public static final String         SPLIT_BY_DOT_PATTERN             = "\\.";
105
106     public static final String         OIC_R_LIGHT                      = "oic.r.light";
107 }