类 DictionaryTransService
java.lang.Object
org.dromara.trans.service.impl.DictionaryTransService
- 所有已实现的接口:
ITransTypeService,org.springframework.beans.factory.InitializingBean
public class DictionaryTransService
extends Object
implements ITransTypeService, org.springframework.beans.factory.InitializingBean
字典翻译服务
- 作者:
- jackwang
-
字段概要
从接口继承的字段 org.dromara.trans.service.impl.ITransTypeService
GLOBAL_TRANS_CACHE, Logger, namespaceUniqueFieldMap -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidvoidclearCache(Map<String, Object> messageMap) 清理本地缓存获取map翻译的keyvoid标记使用redisvoidnoticeOtherService(String dictGroupCode) 通知其他的微服务刷新缓存voidopenI18n(LocaleGetter localeGetter) 开启国际化voidrefreshCache(String dictGroupCode, Map<String, String> dicMap) 刷新缓存voidrefreshCacheAndNoticeOtherService(String dictGroupCode, Map<String, String> dicMap) 刷新缓存并通知其他的微服务清理缓存voidrefreshDictItem(String dictGroupCode, String dictCode, String dictTransResult) 刷新单个字典,用于字典项的新增和修改操作voidremoveDictGroupAndNoticeOtherService(String dictGroupCode) 删除字典分组缓存并且通知其他的微服务同步删除进程缓存void翻译多个 字段void翻译一个字段voidunTransMore(List objList, List<Field> toTransList) 反向翻译多个 字段voidunTransOne(Object obj, List<Field> toTransList) 反向翻译一个字段从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.dromara.trans.service.impl.ITransTypeService
clearGlobalCache, findById, findByIds, getFromGlobalCache, initLocalFromGlobalCache, put2GlobalCache, reset, setRef, setRef, setRef, setRef, setRef, setRefs, setUniqueFieldCache, setValue
-
构造器详细资料
-
DictionaryTransService
public DictionaryTransService()
-
-
方法详细资料
-
refreshCache
刷新缓存- 参数:
dictGroupCode- 字典分组编码dicMap- 字典map
-
refreshCacheAndNoticeOtherService
刷新缓存并通知其他的微服务清理缓存- 参数:
dictGroupCode- 字典分组编码dicMap- 字典map
-
removeDictGroupAndNoticeOtherService
删除字典分组缓存并且通知其他的微服务同步删除进程缓存- 参数:
dictGroupCode- 字典分组编码
-
refreshDictItem
刷新单个字典,用于字典项的新增和修改操作- 参数:
dictGroupCode- 分组编码dictCode- 字典编码dictTransResult- 字典翻译结果
-
noticeOtherService
通知其他的微服务刷新缓存- 参数:
dictGroupCode- 字典分组编码
-
clearCache
清理本地缓存- 参数:
messageMap-
-
getDictionaryTransMap
-
unTransOne
从接口复制的说明:ITransTypeService反向翻译一个字段- 指定者:
unTransOne在接口中ITransTypeService- 参数:
obj- 需要翻译的对象toTransList- 需要翻译的字段
-
unTransMore
从接口复制的说明:ITransTypeService反向翻译多个 字段- 指定者:
unTransMore在接口中ITransTypeService- 参数:
objList- 需要翻译的对象集合toTransList- 需要翻译的字段集合
-
transOne
从接口复制的说明:ITransTypeService翻译一个字段- 指定者:
transOne在接口中ITransTypeService- 参数:
obj- 需要翻译的对象toTransList- 需要翻译的字段
-
getMapKey
获取map翻译的key- 参数:
dictGroupCode- 字典分组编码dictCode- 字典编码- 返回:
- 翻译mapkey
-
transMore
public void transMore(List<? extends org.dromara.core.trans.vo.VO> objList, List<Field> toTransList) 从接口复制的说明:ITransTypeService翻译多个 字段- 指定者:
transMore在接口中ITransTypeService- 参数:
objList- 需要翻译的对象集合toTransList- 需要翻译的字段集合
-
afterPropertiesSet
- 指定者:
afterPropertiesSet在接口中org.springframework.beans.factory.InitializingBean- 抛出:
Exception
-
openI18n
开启国际化- 参数:
localeGetter-
-
makeUseRedis
public void makeUseRedis()标记使用redis
-