com.rt.core.constant.RTConst Maven / Gradle / Ivy
package com.rt.core.constant;
import com.rt.core.util.RTUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.util.Map;
/**
* 常用字符串
*/
public class RTConst {
/* --------------- logic ---------------------- */
public static final String HIBERNATE_MAPPING_LOCATIONS = "hibernate.mapping_locations";
public static final String DB_UT = "db_ut";
public static final String DB_SQL = "db_sql";
public static final String DB_TABLE_NAME = "db_table_name";
public static final String DB_OBJECT_TAG = "db_object_tag";
public static final String DB_SQL_STATE = "db_sql_state";
public static final String DB_OBJECT_TAG_ADD = "db_add";
public static final String DB_OBJECT_TAG_UPD = "db_upd";
public static final String DB_OBJECT_TAG_DEL = "db_del";
public static final String MX_INTERNAL_UID = "mx_internal_uid";
public static final String OBJECT_SELECTED = "obj_selected";
public static String[] OBJECT_KEYWORD_ARRAY = {DB_TABLE_NAME,
DB_OBJECT_TAG, DB_SQL_STATE, DB_OBJECT_TAG_ADD, DB_OBJECT_TAG_UPD,
DB_OBJECT_TAG_DEL, MX_INTERNAL_UID, OBJECT_SELECTED};
public static String[] setObjectKeywordArray(String[] keywordArray) {
if (keywordArray == null) {
return OBJECT_KEYWORD_ARRAY;
}
OBJECT_KEYWORD_ARRAY = (String[]) ArrayUtils.addAll(
OBJECT_KEYWORD_ARRAY, keywordArray);
return OBJECT_KEYWORD_ARRAY;
}
public static void clearObject(Map object) {
RTUtil.removeMapObject(object, RTConst.OBJECT_KEYWORD_ARRAY);
}
/* --------------- 字符 ---------------------- */
public static final int ZERO = 0;
public static final int ONE = 0;
public final static String MALE = "male";
public final static String FEMALE = "female";
public final static String UNICODE = "(\\\\u[a-f,A-F,0-9]{4,4})";
public final static String NUMBER = "[^0-9.]";
public final static String PROPERTIE = "\\{(.*?)\\}";
public final static String VARIABLE = "\\$\\{(.*?)\\}";
public final static String SQL_VARIABLES = "\\(:(.*?)\\)";
public final static String SEPARATOR = "/";
public final static String PATH_SEPARATOR = "/";
public final static String ON = "on";
public final static String OFF = "on";
public final static Object NULL = null;
public final static String NA = "N/A";
public final static String COLON = ":";
public final static String NEW_LINE = "\n";
public final static String ROOT_PATH = "/";
public final static String UNIX_PATH = "/";
public final static String WIN_PATH = "\\";
public final static String WEB_ROOT = "/WEB-INF";
public final static String ESC = "\\";
public final static String SPLIT_DOT = "\\.";
public final static String DOT = ".";
public final static String AT = "@";
public final static String COMMA = ",";
public final static String VARIABLE_CODE = "$";
public final static String VARIABLE_RCODE = "\\$";
public final static String LINE = "-";
public final static String SUB_LINE = "_";
public final static String DB_SPLIT = "_";
public final static String WILDCARD = "%";
public final static String STAR = "*";
public final static String QUESTION_MARK = "?";
public final static String APOSTROPHE = "'";
public final static String SPACE = " ";
public final static String EMPTY = "";
public final static String IN_XAR = "!";
public final static String ASCII_L = "";
public final static String ASCII_R = ";";
public final static String TRUE = "true";
public final static String FALSE = "false";
public final static String FIRST_ARRAY = "[0]";
/* --------------- ognl ---------------------- */
public final static String RS = "#rs";
public final static String IMPL = "#impl";
public final static String Modify = "#modify";
/* --------------- 名称 ---------------------- */
public final static String URL_FILE_HEAD = "file:";
public final static String SECOND_CODE = "SSS";
public final static String LIB = "lib";
public final static String CLASS = "class";
public final static String BIN = "bin";
public final static String CLASSES = "classes";
public final static String CLASSES_PATH = "/classes";
public final static String SUCCESS = "success";
public final static String FAILURE = "failure";
public final static String PASS = "pass";
public final static String RETURN = "return";
public final static String ECHO = "echo";
/* --------------- 日志 ---------------------- */
public static final String DEBUG = "debug";
public static final String INFO = "info";
public static final String WARN = "warn";
public static final String ERROR = "error";
public static final String FATAL = "fatal";
public static final String SYSTEM = "system";
public static final String USER = "user";
/* --------------- 数据库操作 ---------------------- */
public static final String RESULT = "result";
public static final String COUNT = "count";
public static final String OFFSET = "offset";
public static final String LIMIT = "limit";
public static String MAX_RESULTS = "max";
public static String PAGE = "page";
public static String ADD = "add";
public static String UPD = "upd";
public static String DEL = "del";
/* --------------- 字符集 ---------------------- */
public final static String UTF_8 = "UTF-8";
public final static String UTF_8_MB4 = "UTF8MB4";
public final static String ISO_8859_1 = "ISO-8859-1";
/* --------------- 文件类型 ---------------------- */
public final static String HTML = "html";
public final static String XML = "xml";
public final static String DOT_XML = ".xml";
public final static String DOT_BAK = ".bak";
public final static String DOT_LOG = ".log";
public final static String XHTML = "xhtml";
/* --------------- MimeType ---------------------- */
public final static String TEXT_HTML = "text/html";
public final static String TEXT_XHTML = "text/xhtml";
/* --------------- 对象/函数名 ---------------------- */
public final static String SET = "set";
public final static String GET = "get";
/* --------------- 常用字符串 ---------------------- */
public static final String XML_HEADER = "";
/* --------------- 常用字符串 ---------------------- */
public static String LOGIC_ID = "logicId";
public static final String DATA = "data";
public static final String OGNL = "ognl";
public static final String FORMAT = "format";
public static final String SHA1 = "sha1";
public static final String MD5 = "md5";
public static final String ID = "id";
public static final String KEY = "key";
public static final String NAME = "name";
public static final String VALUE = "value";
public static final String TYPE = "type";
public static final String LEVEL = "level";
}