Package ome.services.sessions
Class SessionContextImpl
- java.lang.Object
-
- ome.services.sessions.SessionContextImpl
-
- All Implemented Interfaces:
SessionContext
,ome.system.EventContext
public class SessionContextImpl extends java.lang.Object implements SessionContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ome.services.sessions.SessionContext
SessionContext.Count
-
-
Constructor Summary
Constructors Constructor Description SessionContextImpl(ome.model.meta.Session session, java.util.List<java.lang.Long> lGroups, java.util.List<java.lang.Long> mGroups, java.util.List<java.lang.String> roles, SessionStats stats, SessionContext previous)
SessionContextImpl(ome.model.meta.Session session, java.util.Set<ome.model.enums.AdminPrivilege> adminPrivileges, java.util.List<java.lang.Long> lGroups, java.util.List<java.lang.Long> mGroups, java.util.List<java.lang.String> roles, SessionStats stats, ome.system.Roles _roles, SessionContext previous)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionContext.Count
count()
Returns theSessionContext.Count
instance held by this context.java.util.Set<ome.model.enums.AdminPrivilege>
getCurrentAdminPrivileges()
java.lang.Long
getCurrentEventId()
java.lang.String
getCurrentEventType()
java.lang.Long
getCurrentGroupId()
java.lang.String
getCurrentGroupName()
ome.model.internal.Permissions
getCurrentGroupPermissions()
java.lang.Long
getCurrentSessionId()
java.lang.String
getCurrentSessionUuid()
java.lang.Long
getCurrentShareId()
java.lang.Long
getCurrentSudoerId()
java.lang.String
getCurrentSudoerName()
ome.model.internal.Permissions
getCurrentUmask()
java.lang.Long
getCurrentUserId()
java.lang.String
getCurrentUserName()
java.util.List<java.lang.Long>
getLeaderOfGroupsList()
java.util.List<java.lang.Long>
getMemberOfGroupsList()
ome.model.meta.Session
getSession()
java.util.List<java.lang.String>
getUserRoles()
boolean
isCurrentUserAdmin()
boolean
isReadOnly()
void
setShareId(java.lang.Long shareId)
The Share id is the only mutable bit in theSessionContext
.SessionStats
stats()
Return aSessionStats
implementation for this session.
-
-
-
Constructor Detail
-
SessionContextImpl
public SessionContextImpl(ome.model.meta.Session session, java.util.List<java.lang.Long> lGroups, java.util.List<java.lang.Long> mGroups, java.util.List<java.lang.String> roles, SessionStats stats, SessionContext previous)
-
SessionContextImpl
public SessionContextImpl(ome.model.meta.Session session, java.util.Set<ome.model.enums.AdminPrivilege> adminPrivileges, java.util.List<java.lang.Long> lGroups, java.util.List<java.lang.Long> mGroups, java.util.List<java.lang.String> roles, SessionStats stats, ome.system.Roles _roles, SessionContext previous)
-
-
Method Detail
-
count
public SessionContext.Count count()
Description copied from interface:SessionContext
Returns theSessionContext.Count
instance held by this context. This may be shared with other contexts, so that in critical phases as when the context is being copied, the reference count will be kept in sync.- Specified by:
count
in interfaceSessionContext
-
stats
public SessionStats stats()
Description copied from interface:SessionContext
Return aSessionStats
implementation for this session.- Specified by:
stats
in interfaceSessionContext
-
getSession
public ome.model.meta.Session getSession()
- Specified by:
getSession
in interfaceSessionContext
-
getUserRoles
public java.util.List<java.lang.String> getUserRoles()
- Specified by:
getUserRoles
in interfaceSessionContext
-
setShareId
public void setShareId(java.lang.Long shareId)
Description copied from interface:SessionContext
The Share id is the only mutable bit in theSessionContext
.- Specified by:
setShareId
in interfaceSessionContext
-
getCurrentShareId
public java.lang.Long getCurrentShareId()
- Specified by:
getCurrentShareId
in interfaceome.system.EventContext
-
getCurrentSessionId
public java.lang.Long getCurrentSessionId()
- Specified by:
getCurrentSessionId
in interfaceome.system.EventContext
-
getCurrentSessionUuid
public java.lang.String getCurrentSessionUuid()
- Specified by:
getCurrentSessionUuid
in interfaceome.system.EventContext
-
getCurrentEventId
public java.lang.Long getCurrentEventId()
- Specified by:
getCurrentEventId
in interfaceome.system.EventContext
-
getCurrentEventType
public java.lang.String getCurrentEventType()
- Specified by:
getCurrentEventType
in interfaceome.system.EventContext
-
getCurrentGroupId
public java.lang.Long getCurrentGroupId()
- Specified by:
getCurrentGroupId
in interfaceome.system.EventContext
-
getCurrentGroupName
public java.lang.String getCurrentGroupName()
- Specified by:
getCurrentGroupName
in interfaceome.system.EventContext
-
getCurrentGroupPermissions
public ome.model.internal.Permissions getCurrentGroupPermissions()
- Specified by:
getCurrentGroupPermissions
in interfaceome.system.EventContext
-
getCurrentUserId
public java.lang.Long getCurrentUserId()
- Specified by:
getCurrentUserId
in interfaceome.system.EventContext
-
getCurrentUserName
public java.lang.String getCurrentUserName()
- Specified by:
getCurrentUserName
in interfaceome.system.EventContext
-
getCurrentSudoerId
public java.lang.Long getCurrentSudoerId()
- Specified by:
getCurrentSudoerId
in interfaceome.system.EventContext
-
getCurrentSudoerName
public java.lang.String getCurrentSudoerName()
- Specified by:
getCurrentSudoerName
in interfaceome.system.EventContext
-
getLeaderOfGroupsList
public java.util.List<java.lang.Long> getLeaderOfGroupsList()
- Specified by:
getLeaderOfGroupsList
in interfaceome.system.EventContext
-
getMemberOfGroupsList
public java.util.List<java.lang.Long> getMemberOfGroupsList()
- Specified by:
getMemberOfGroupsList
in interfaceome.system.EventContext
-
isCurrentUserAdmin
public boolean isCurrentUserAdmin()
- Specified by:
isCurrentUserAdmin
in interfaceome.system.EventContext
-
getCurrentAdminPrivileges
public java.util.Set<ome.model.enums.AdminPrivilege> getCurrentAdminPrivileges()
- Specified by:
getCurrentAdminPrivileges
in interfaceome.system.EventContext
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in interfaceome.system.EventContext
-
getCurrentUmask
public ome.model.internal.Permissions getCurrentUmask()
-
-