类 SysParam

java.lang.Object
com.sh.base.frame.common.SysParam

public final class SysParam extends Object

Title: 首亨软件 - 获取以及设置系统参数

Description: 首亨软件 - SHForce

Company:首亨软件(重庆)有限公司

Author:江兴春

  • 字段详细资料

    • VERSION

      public static long VERSION
    • classPath

      public static String classPath
    • constMap

      public static ConcurrentHashMap<String,String> constMap
      保存sys_const_table中的常量,构造规则为:key=const_type+const_name,value=const_value
    • SERVER_START_DAY

      public static final String SERVER_START_DAY
    • SERVER_START_TIME

      public static final String SERVER_START_TIME
    • SERVER_START_TIME_FULL

      public static final Date SERVER_START_TIME_FULL
    • EVENT_INIT_FINISH

      public static final String EVENT_INIT_FINISH
      另请参阅:
    • isLoadSysParamFinish

      public static boolean isLoadSysParamFinish
    • SERVER_ALIAS

      public static String SERVER_ALIAS
    • DEPLOY_DIR

      public static String DEPLOY_DIR
    • EX_CONFIG_DIR

      public static String EX_CONFIG_DIR
    • APP_ROOT_DIR

      @Deprecated public static String APP_ROOT_DIR
      已过时。
    • LINE_SEPARATOR

      public static final String LINE_SEPARATOR
    • SERVER_MODE

      public static int SERVER_MODE
    • SERVER_IP

      public static String SERVER_IP
    • systemStartupNotify

      public static final DelayUtil.DelayNotify systemStartupNotify
  • 构造器详细资料

    • SysParam

      public SysParam()
  • 方法详细资料

    • initJ2SERuntime

      public static void initJ2SERuntime()
    • initJ2SERuntime

      public static void initJ2SERuntime(Consumer consumer)
      初始化J2EE运行环境
    • getSystemStartupNotify

      public static DelayUtil.DelayNotify getSystemStartupNotify()
    • waitSystemStartup

      public static boolean waitSystemStartup()
      阻塞等待系统初始化完毕
    • isJ2SEModel

      public static boolean isJ2SEModel()
      客户端J2SE模式
      返回:
      boolean
    • isJ2EEModel

      public static boolean isJ2EEModel()
      服务端J2EE模式
      返回:
      boolean
    • isSpringbootModel

      public static boolean isSpringbootModel()
      Springboot模式
      返回:
      boolean
    • getServerAddr

      public static String getServerAddr(String serverId)
      获取服务器信息
      参数:
      serverId - String
      返回:
      String
    • isDevMode

      public static boolean isDevMode()
      判断是否开发模式
      返回:
      true|false
    • getIEVersion

      public static int getIEVersion(jakarta.servlet.http.HttpServletRequest request, String userId)
      使用浏览器的最低版本 默认IE6
      参数:
      request - HttpServletRequest
      userId - String
      返回:
      int
    • getDefaultHref

      public static String getDefaultHref(jakarta.servlet.http.HttpServletRequest request, String userId)
      默认A标签HREF值
      参数:
      request - HttpServletRequest
      userId - String
      返回:
      String
    • getDefaultHref

      public static String getDefaultHref(jakarta.servlet.http.HttpServletRequest request)
    • getDefaultHref

      public static String getDefaultHref()
    • loadServerConfig

      public static void loadServerConfig(DataCenter dc)
      加载可访问服务器
      参数:
      dc - DataCenter
    • loginServer

      public static void loginServer(DataCenter dc, String userId, String serverId)
      创建服务器
      参数:
      dc - DataCenter
      userId - String
      serverId - String
    • logoutServer

      public static void logoutServer(DataCenter dc, String userId, String serverId)
      退出服务器
      参数:
      dc - DataCenter
      userId - String
      serverId - String
    • getShforceJars

      public static List<String> getShforceJars()
      Shforce相关的JAR包
      返回:
      List
    • putShforceJars

      protected static void putShforceJars(String jarName)
      添加SHFORCE的JAR包
      参数:
      jarName -
    • saveParam

      public static boolean saveParam(String constType, String paramName, String paramValue)
    • saveParam

      public static boolean saveParam(DataCenter dc, String constType, String paramName, String paramValue)
      将参数值保存到数据库中sys_const_value表中
      参数:
      dc - DataCenter对象
      constType - String参数类型
      paramName - String参数名称
      paramValue - String参数值
      返回:
      boolean是否成功,true成功,false失败
    • getParam

      public static String getParam(DataCenter dc, String constType, String paramName)
      从系统表中获取参数的值
      参数:
      dc - DataCenter 数据中心
      constType - String参数类型
      paramName - String 参数名称
      返回:
      String 取参数的值
    • getIntParam

      public static int getIntParam(DataCenter dc, String constType, String paramName)
      从系统表中获取int型参数的值
      参数:
      dc - DataCenter 数据中心
      constType - String参数类型
      paramName - String 参数名称
      返回:
      String int型参数的值
    • getIntParam

      public static int getIntParam(String constType, String paramName)
      从系统表中获取int型参数的值
      参数:
      constType - String参数类型
      paramName - String 参数名称
      返回:
      String int型参数的值
    • getIntParam

      public static int getIntParam(String constType, String paramName, int defaultValue)
    • loadAllParamToMap

      public static void loadAllParamToMap()
    • refreshLoadParam

      public static void refreshLoadParam()
    • refreshLoadParam

      public static void refreshLoadParam(DataCenter dc)
    • loadAllParamToMap

      public static void loadAllParamToMap(DataCenter dc) throws Exception
      将sys_const_table中所有的参数一次性加载到HashMap中
      参数:
      dc - DataCenter对象
      抛出:
      Exception - Exception
    • updateParam

      public static void updateParam(String constType, String constName, String constValue)
      更新系统变量
      参数:
      constType - String
      constName - String
      constValue - String
    • updateParam

      public static void updateParam(String constType, String constName, String constValue, boolean triggerEvent)
      更新系统变量
      参数:
      constType - String
      constName - String
      constValue - String
      triggerEvent - 触发事件
    • updateParam

      @Deprecated public static void updateParam(String constKey, String constValue)
      已过时。
      更新系统变量
      参数:
      constKey - String
      constValue - String
    • getParamInner

      public static String getParamInner(jakarta.servlet.http.HttpServletRequest request, String constType, String constName)
      获取系统属性
      参数:
      request - HttpServletRequest
      constType - String
      constName - String
      返回:
      String
    • getParam

      public static String getParam(jakarta.servlet.http.HttpServletRequest request, String constType, String constName)
      获取系统属性
      参数:
      request - HttpServletRequest
      constType - String
      constName - String
      返回:
      String
    • getParamInner

      public static String getParamInner(String constType, String constName)
    • getParamLanguage

      public static String getParamLanguage(String constType, String constName)
      获取系统属性,并进行语言转换
      参数:
      constType -
      constName -
      返回:
    • getParam

      public static String getParam(String constType, String constName)
      获取系统属性
      参数:
      constType - String
      constName - String
      返回:
      String
    • getParam

      public static String getParam(String constType, String constName, String defaultValue)
    • getSystemValue

      public static String getSystemValue(String key)
      获取系统(System.properties)属性
      参数:
      key - String
      返回:
      String
    • setSystemValue

      public static void setSystemValue(String key, String value)
      设置系统变量
      参数:
      key - String
      value - String
    • getSystemValue

      public static String getSystemValue(String key, String defaultValue)
      获取系统属性
      参数:
      key - String
      defaultValue - 默认值
      返回:
      String
    • getSystemIntValue

      public static int getSystemIntValue(String key, String defaultValue)
      获取系统整形属性
      参数:
      key - String
      defaultValue - String
      返回:
      int
    • getSystemIntValue2

      public static int getSystemIntValue2(String key, int defaultValue)
    • getSystemBooleanValue

      public static boolean getSystemBooleanValue(String key, String defaultValue)
      获取系统BOOLEAN属性
      参数:
      key - String
      defaultValue - String
      返回:
      boolean
    • getSystemExValue

      public static String getSystemExValue(String key)
      获取系统扩展属性
      参数:
      key - String
      返回:
      String
    • setSystemExValue

      public static void setSystemExValue(String key, String value)
      设置系统扩展属性
      参数:
      key - String
      value - String
    • getSystemExValue

      public static String getSystemExValue(String key, String defaultValue)
      获取系统扩展属性
      参数:
      key - String
      defaultValue - 默认值
      返回:
      String
    • getSystemExIntValue

      public static int getSystemExIntValue(String key, String defaultValue)
      获取系统扩展整形属性
      参数:
      key - String
      defaultValue - 默认值
      返回:
      int
    • getSystemExBooleanValue

      public static boolean getSystemExBooleanValue(String key, String defaultValue)
      获取BOOLEAN类型
      参数:
      key - String
      defaultValue - String
      返回:
      boolean
    • loadFrameConf

      public static boolean loadFrameConf()
      加载配置文件
      返回:
      boolean
    • getFrameConfList

      public static List<Class> getFrameConfList(String key)
      获取frameConf.xml中配置的数据
      参数:
      key - String
      返回:
      List
    • getDBQueueList

      public static List<Class> getDBQueueList()
      获取实现了DBQueue接口的类
      返回:
      List
    • getTaskList

      public static List<Class> getTaskList()
      获取实现了Task接口的类
      返回:
      List
    • getDumpTaskList

      public static List<Class> getDumpTaskList()
      获取实现了DumpTasks接口的类
      返回:
      List
    • getCheckSequences

      public static List<String> getCheckSequences()
      系统启动时检查序列
      返回:
      List
    • getSkinVersion

      public static String getSkinVersion()
      获取当前皮肤使用版本
      返回:
      String
    • isRedisLogin

      public static boolean isRedisLogin()
      是否使用用redis作为登陆缓存
      返回:
      boolean
    • isDefaultCacheLogin

      public static boolean isDefaultCacheLogin()
      是否使用用默认本地缓存作为登陆缓存
      返回:
      boolean
    • refreshSystemUser

      public static boolean refreshSystemUser(DataCenter dc, String userId)
      刷新登录用户
      参数:
      dc - DataCenter
      userId - String
      返回:
      boolean
    • getCacheUserInfo

      public static UserInfo getCacheUserInfo(String userId)