com.github.dactiv.showcase.common
类 SystemVariableUtils

java.lang.Object
  继承者 com.github.dactiv.showcase.common.SystemVariableUtils

@Component
public class SystemVariableUtils
extends Object

系统变量工具类

作者:
maurice

字段摘要
static String DEFAULT_DICTIONARY_VALUE
           
 
构造方法摘要
SystemVariableUtils()
           
 
方法摘要
static String getName(Class<? extends Enum<? extends ValueEnum<?>>> enumClass, Object value)
          通过字典枚举获取字典名称
static String getName(SystemDictionaryCode systemDictionaryCode, Object value)
          获取数据字典名称
static SessionVariable getSessionVariable()
          获取当前安全模型
static List<DataDictionary> getVariables(Class<? extends Enum<? extends ValueEnum<?>>> enumClass, Object... ignoreValue)
          通过字典枚举获取数据字典集合
static List<DataDictionary> getVariables(SystemDictionaryCode code, String... ignoreValue)
          通过字典类别代码获取数据字典集合
 void init()
          为了能够借助Spring自动注入systemDictionaryManager这个Bean.写一个空方法借助@PostConstruct注解注入
static boolean isAuthenticated()
          判断当前会话是否登录
 void setSystemVariableManager(SystemVariableManager systemDictionaryManager)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

DEFAULT_DICTIONARY_VALUE

public static String DEFAULT_DICTIONARY_VALUE
构造方法详细信息

SystemVariableUtils

public SystemVariableUtils()
方法详细信息

setSystemVariableManager

@Autowired
public void setSystemVariableManager(SystemVariableManager systemDictionaryManager)

init

@PostConstruct
public void init()
为了能够借助Spring自动注入systemDictionaryManager这个Bean.写一个空方法借助@PostConstruct注解注入


getName

public static String getName(SystemDictionaryCode systemDictionaryCode,
                             Object value)
获取数据字典名称

参数:
systemDictionaryCode - 类别代码
value - 值
返回:
String

getName

public static String getName(Class<? extends Enum<? extends ValueEnum<?>>> enumClass,
                             Object value)
通过字典枚举获取字典名称

参数:
enumClass - 字典枚举class
value - 值
返回:
String

getVariables

public static List<DataDictionary> getVariables(SystemDictionaryCode code,
                                                String... ignoreValue)
通过字典类别代码获取数据字典集合

参数:
code - 字典类别
ignoreValue - 忽略字典的值
返回:
List

getVariables

public static List<DataDictionary> getVariables(Class<? extends Enum<? extends ValueEnum<?>>> enumClass,
                                                Object... ignoreValue)
通过字典枚举获取数据字典集合

参数:
enumClass - 字典枚举 class
ignoreValue - 忽略字典的值
返回:
List

getSessionVariable

public static SessionVariable getSessionVariable()
获取当前安全模型

返回:
SessionVariable

isAuthenticated

public static boolean isAuthenticated()
判断当前会话是否登录

返回:
boolean


Copyright © 2013. All rights reserved.