2018-11-13 11:56:12 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 ETH Zürich, Educational Development and Technology (LET)
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
2018-11-14 13:58:27 +01:00
|
|
|
package ch.ethz.seb.sebserver.gbl;
|
2018-11-13 11:56:12 +01:00
|
|
|
|
|
|
|
import org.joda.time.format.DateTimeFormat;
|
|
|
|
import org.joda.time.format.DateTimeFormatter;
|
|
|
|
|
|
|
|
/** Global Constants used in SEB Server web-service as well as in web-gui component */
|
2018-11-14 16:13:53 +01:00
|
|
|
public final class Constants {
|
2018-11-13 11:56:12 +01:00
|
|
|
|
2019-04-26 20:22:17 +02:00
|
|
|
public static final int JN_CRYPTOR_ITERATIONS = 10000;
|
|
|
|
|
2019-03-21 16:55:11 +01:00
|
|
|
public static final String TRUE_STRING = Boolean.TRUE.toString();
|
|
|
|
public static final String FALSE_STRING = Boolean.FALSE.toString();
|
|
|
|
|
2019-03-14 13:32:26 +01:00
|
|
|
public static final long SECOND_IN_MILLIS = 1000;
|
|
|
|
public static final long MINUTE_IN_MILLIS = 60 * SECOND_IN_MILLIS;
|
|
|
|
public static final long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS;
|
|
|
|
public static final long DAY_IN_MILLIS = 24 * HOUR_IN_MILLIS;
|
|
|
|
|
2018-12-17 16:36:04 +01:00
|
|
|
public static final Character LIST_SEPARATOR_CHAR = ',';
|
|
|
|
public static final String LIST_SEPARATOR = ",";
|
2019-04-01 13:44:15 +02:00
|
|
|
public static final String EMBEDDED_LIST_SEPARATOR = "|";
|
2019-02-05 16:45:41 +01:00
|
|
|
public static final String EMPTY_NOTE = "--";
|
2019-02-21 17:00:42 +01:00
|
|
|
public static final String FORM_URL_ENCODED_SEPARATOR = "&";
|
|
|
|
public static final String FORM_URL_ENCODED_NAME_VALUE_SEPARATOR = "=";
|
2019-09-09 14:36:29 +02:00
|
|
|
public static final String URL_PORT_SEPARATOR = ":";
|
|
|
|
public static final String URL_ADDRESS_SEPARATOR = "://";
|
|
|
|
public static final String URL_PATH_SEPARATOR = "/";
|
2018-12-17 16:36:04 +01:00
|
|
|
|
2019-05-15 17:01:12 +02:00
|
|
|
public static final String PERCENTAGE = "%";
|
|
|
|
|
2019-03-26 13:00:09 +01:00
|
|
|
public static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
|
2019-03-20 14:32:36 +01:00
|
|
|
public static final String TIME_ZONE_OFFSET_TAIL_FORMAT = "|ZZ";
|
2019-03-07 12:10:48 +01:00
|
|
|
|
2019-07-24 12:46:48 +02:00
|
|
|
public static final String DEFAULT_DIPLAY_DATE_TIME_FORMAT = "MM-dd-yyyy HH:mm:ss";
|
|
|
|
public static final String DEFAULT_DISPLAY_DATE_FORMAT = "MM-dd-yyyy";
|
|
|
|
public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";
|
|
|
|
|
2019-03-26 13:00:09 +01:00
|
|
|
public static final DateTimeFormatter STANDARD_DATE_TIME_FORMATTER = DateTimeFormat
|
|
|
|
.forPattern(DEFAULT_DATE_TIME_FORMAT)
|
|
|
|
.withZoneUTC();
|
|
|
|
|
2019-06-05 09:58:59 +02:00
|
|
|
public static final String XML_VERSION_HEADER =
|
|
|
|
"<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
|
|
|
public static final String XML_DOCTYPE_HEADER =
|
|
|
|
"<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">";
|
|
|
|
public static final String XML_PLIST_START_V1 =
|
|
|
|
"<plist version=\"1.0\">";
|
|
|
|
public static final String XML_PLIST_END =
|
|
|
|
"</plist>";
|
|
|
|
public static final String XML_DICT_START =
|
|
|
|
"<dict>";
|
|
|
|
public static final String XML_DICT_END =
|
|
|
|
"</dict>";
|
|
|
|
|
2019-07-17 08:03:19 +02:00
|
|
|
public static final String OAUTH2_GRANT_TYPE_PASSWORD = "password";
|
|
|
|
public static final String OAUTH2_GRANT_TYPE_REFRESH_TOKEN = "refresh_token";
|
|
|
|
public static final String OAUTH2_GRANT_TYPE_CLIENT_CREDENTIALS = "client_credentials";
|
|
|
|
public static final String OAUTH2_SCOPE_READ = "read";
|
|
|
|
public static final String OAUTH2_SCOPE_WRITE = "write";
|
2018-11-13 11:56:12 +01:00
|
|
|
}
|