2 * Copyright 2015 Samsung Electronics All Rights Reserved.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package oic.simulator.serviceprovider.utils;
19 import org.oic.simulator.serviceprovider.AutomationType;
22 * This class maintains all constants which are used throughout the service
25 public class Constants {
27 public static final String CONFIG_DIRECTORY_PATH = "/resource";
29 public static final String UNDERSCORE = "_";
30 public static final String FORWARD_SLASH = "/";
32 public static final String OIC_PREFIX = "/oic/r";
33 public static final String SIMULATOR = "simulator";
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";
40 public static final String[] META_PROPERTIES = {
41 RESOURCE_URI, RESOURCE_TYPE, CONNECTIVITY_TYPE };
43 public static final int META_PROPERTY_COUNT = META_PROPERTIES.length;
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";
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)";
54 public static final String[] AUTOMATION_SETTINGS = {
55 AUTOMATION_TYPE, UPDATE_INTERVAL_IN_MS };
57 public static final int AUTOMATION_SETTINGS_COUNT = AUTOMATION_SETTINGS.length;
59 public static final String START_RESOURCE_AUTOMATION = "Start Automation";
60 public static final String STOP_RESOURCE_AUTOMATION = "Stop Automation";
62 public static final int DISPLAY_RESOURCE_URI_TOKEN_COUNT = 2;
64 public static final AutomationType DEFAULT_AUTOMATION_TYPE = AutomationType.NORMAL;
66 public static final int DEFAULT_AUTOMATION_INTERVAL = 500;
68 public static final int PROPER_LOG_TIME_TOKEN_LENGTH = 3;
70 public static final String[] BROWSE_RAML_FILTER_EXTENSIONS = new String[] { "*.raml" };
71 public static final String[] SAVE_LOG_FILTER_EXTENSIONS = new String[] {
74 public static final int LOG_SIZE = 1000;
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";
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";
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";
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";
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";
99 public static final String RAML_FILE_PREFIX = "/resource/";
101 public static final String RAML_FILE_EXTENSION = ".raml";
102 public static final String JSON_FILE_EXTENSION = ".json";
104 public static final String SPLIT_BY_DOT_PATTERN = "\\.";
106 public static final String SAMPLE_LIGHT = "sample.light";