Package io.tesler.core.util.session.impl
Class SessionServiceImpl
- java.lang.Object
-
- io.tesler.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 class
SessionServiceImpl.UserCache
-
Constructor Summary
Constructors Constructor Description SessionServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>
getCurrentScreenViews()
Возвращает доступные вью текущего скринаString
getFirstViewFromResponsibilities(String... views)
Map<String,Boolean>
getResponsibilities()
String
getSessionId()
String
getSessionIpAddress()
User
getSessionUser()
Department
getSessionUserDepartment()
Division
getSessionUserDivision()
Division
getSessionUserDivision(LOV levelCd)
LOV
getSessionUserRole()
List<UserRole>
getSessionUserRoles()
List<String>
getViews(String screenName)
void
setSessionUserInternalRole(String role)
void
setSessionUserLocale(LOV locale)
void
setSessionUserTimezone(LOV timezone)
-
-
-
Method Detail
-
getSessionUser
@Cacheable(cacheNames="requestCache", key="#root.methodName") public User getSessionUser()
- Specified by:
getSessionUser
in interfaceSessionService
-
getSessionUserDepartment
public Department getSessionUserDepartment()
- Specified by:
getSessionUserDepartment
in interfaceSessionService
-
getSessionUserRole
@Cacheable(cacheNames="requestCache", key="#root.methodName") public LOV getSessionUserRole()
- Specified by:
getSessionUserRole
in interfaceSessionService
-
setSessionUserTimezone
public void setSessionUserTimezone(LOV timezone)
- Specified by:
setSessionUserTimezone
in interfaceSessionService
-
setSessionUserLocale
public void setSessionUserLocale(LOV locale)
- Specified by:
setSessionUserLocale
in interfaceSessionService
-
setSessionUserInternalRole
public void setSessionUserInternalRole(String role)
- Specified by:
setSessionUserInternalRole
in interfaceSessionService
-
getSessionIpAddress
public String getSessionIpAddress()
- Specified by:
getSessionIpAddress
in interfaceSessionService
-
getResponsibilities
public Map<String,Boolean> getResponsibilities()
- Specified by:
getResponsibilities
in interfaceSessionService
-
getFirstViewFromResponsibilities
public String getFirstViewFromResponsibilities(String... views)
- Specified by:
getFirstViewFromResponsibilities
in interfaceSessionService
-
getSessionId
public String getSessionId()
- Specified by:
getSessionId
in interfaceSessionService
-
getSessionUserDivision
public Division getSessionUserDivision(LOV levelCd)
- Specified by:
getSessionUserDivision
in interfaceSessionService
-
getSessionUserDivision
public Division getSessionUserDivision()
- Specified by:
getSessionUserDivision
in interfaceSessionService
-
getSessionUserRoles
public List<UserRole> getSessionUserRoles()
- Specified by:
getSessionUserRoles
in interfaceSessionService
-
getCurrentScreenViews
public Collection<String> getCurrentScreenViews()
Возвращает доступные вью текущего скрина- Specified by:
getCurrentScreenViews
in interfaceSessionService
-
getViews
public List<String> getViews(String screenName)
- Specified by:
getViews
in interfaceSessionService
-
-