Package org.cxbox.core.util.session.impl
Class SessionServiceImpl
- java.lang.Object
-
- org.cxbox.core.util.session.impl.SessionServiceImpl
-
- All Implemented Interfaces:
SessionService
@Service("sessionService") public class SessionServiceImpl extends Object implements SessionServiceВспомогательный класс для получения данных о текущем пользователе (имя, логин, роли и т.п)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSessionServiceImpl.UserCache
-
Constructor Summary
Constructors Constructor Description SessionServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>getCurrentScreenViews()Возвращает доступные вью текущего скринаStringgetFirstViewFromResponsibilities(String... views)Map<String,Boolean>getResponsibilities()StringgetSessionId()StringgetSessionIpAddress()UsergetSessionUser()DepartmentgetSessionUserDepartment()DivisiongetSessionUserDivision()DivisiongetSessionUserDivision(org.cxbox.api.data.dictionary.LOV levelCd)org.cxbox.api.data.dictionary.LOVgetSessionUserRole()List<UserRole>getSessionUserRoles()List<String>getViews(String screenName)voidsetSessionUserInternalRole(String role)voidsetSessionUserLocale(org.cxbox.api.data.dictionary.LOV locale)voidsetSessionUserTimezone(org.cxbox.api.data.dictionary.LOV timezone)
-
-
-
Method Detail
-
getSessionUser
@Cacheable(cacheResolver="cxboxCacheResolver", cacheNames="requestCache", key="#root.methodName") public User getSessionUser()- Specified by:
getSessionUserin interfaceSessionService
-
getSessionUserDepartment
public Department getSessionUserDepartment()
- Specified by:
getSessionUserDepartmentin interfaceSessionService
-
getSessionUserRole
@Cacheable(cacheResolver="cxboxCacheResolver", cacheNames="requestCache", key="#root.methodName") public org.cxbox.api.data.dictionary.LOV getSessionUserRole()- Specified by:
getSessionUserRolein interfaceSessionService
-
setSessionUserTimezone
public void setSessionUserTimezone(org.cxbox.api.data.dictionary.LOV timezone)
- Specified by:
setSessionUserTimezonein interfaceSessionService
-
setSessionUserLocale
public void setSessionUserLocale(org.cxbox.api.data.dictionary.LOV locale)
- Specified by:
setSessionUserLocalein interfaceSessionService
-
setSessionUserInternalRole
public void setSessionUserInternalRole(String role)
- Specified by:
setSessionUserInternalRolein interfaceSessionService
-
getSessionIpAddress
public String getSessionIpAddress()
- Specified by:
getSessionIpAddressin interfaceSessionService
-
getResponsibilities
public Map<String,Boolean> getResponsibilities()
- Specified by:
getResponsibilitiesin interfaceSessionService
-
getFirstViewFromResponsibilities
public String getFirstViewFromResponsibilities(String... views)
- Specified by:
getFirstViewFromResponsibilitiesin interfaceSessionService
-
getSessionId
public String getSessionId()
- Specified by:
getSessionIdin interfaceSessionService
-
getSessionUserDivision
public Division getSessionUserDivision(org.cxbox.api.data.dictionary.LOV levelCd)
- Specified by:
getSessionUserDivisionin interfaceSessionService
-
getSessionUserDivision
public Division getSessionUserDivision()
- Specified by:
getSessionUserDivisionin interfaceSessionService
-
getSessionUserRoles
public List<UserRole> getSessionUserRoles()
- Specified by:
getSessionUserRolesin interfaceSessionService
-
getCurrentScreenViews
public Collection<String> getCurrentScreenViews()
Возвращает доступные вью текущего скрина- Specified by:
getCurrentScreenViewsin interfaceSessionService
-
getViews
public List<String> getViews(String screenName)
- Specified by:
getViewsin interfaceSessionService
-
-