ome.services.sessions
Class SessionContextImpl

java.lang.Object
  extended by ome.services.sessions.SessionContextImpl
All Implemented Interfaces:
SessionContext, EventContext

public class SessionContextImpl
extends Object
implements SessionContext


Constructor Summary
SessionContextImpl(ome.model.meta.Session session, List<Long> lGroups, List<Long> mGroups, List<String> roles, SessionStats stats)
           
 
Method Summary
 int decrement()
          Decrement the current reference count and return the new value atomically.
 Long getCurrentEventId()
           
 String getCurrentEventType()
           
 Long getCurrentGroupId()
           
 String getCurrentGroupName()
           
 Long getCurrentSessionId()
           
 String getCurrentSessionUuid()
           
 Long getCurrentShareId()
           
 ome.model.internal.Permissions getCurrentUmask()
           
 Long getCurrentUserId()
           
 String getCurrentUserName()
           
 List<Long> getLeaderOfGroupsList()
           
 List<Long> getMemberOfGroupsList()
           
 ome.model.meta.Session getSession()
           
 List<String> getUserRoles()
           
 int increment()
          Increment the current reference count and return the new value atomically.
 boolean isCurrentUserAdmin()
           
 boolean isReadOnly()
           
 int refCount()
          Return the current number of references which this session is aware of.
 void setShareId(Long shareId)
          The Share id is the only mutable bit in the SessionContext.
 SessionStats stats()
          Return a SessionStats implementation for this session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionContextImpl

public SessionContextImpl(ome.model.meta.Session session,
                          List<Long> lGroups,
                          List<Long> mGroups,
                          List<String> roles,
                          SessionStats stats)
Method Detail

refCount

public int refCount()
Description copied from interface: SessionContext
Return the current number of references which this session is aware of.

Specified by:
refCount in interface SessionContext

increment

public int increment()
Description copied from interface: SessionContext
Increment the current reference count and return the new value atomically.

Specified by:
increment in interface SessionContext

decrement

public int decrement()
Description copied from interface: SessionContext
Decrement the current reference count and return the new value atomically.

Specified by:
decrement in interface SessionContext

stats

public SessionStats stats()
Description copied from interface: SessionContext
Return a SessionStats implementation for this session.

Specified by:
stats in interface SessionContext

getSession

public ome.model.meta.Session getSession()
Specified by:
getSession in interface SessionContext

getUserRoles

public List<String> getUserRoles()
Specified by:
getUserRoles in interface SessionContext

setShareId

public void setShareId(Long shareId)
Description copied from interface: SessionContext
The Share id is the only mutable bit in the SessionContext.

Specified by:
setShareId in interface SessionContext

getCurrentShareId

public Long getCurrentShareId()
Specified by:
getCurrentShareId in interface EventContext

getCurrentSessionId

public Long getCurrentSessionId()
Specified by:
getCurrentSessionId in interface EventContext

getCurrentSessionUuid

public String getCurrentSessionUuid()
Specified by:
getCurrentSessionUuid in interface EventContext

getCurrentEventId

public Long getCurrentEventId()
Specified by:
getCurrentEventId in interface EventContext

getCurrentEventType

public String getCurrentEventType()
Specified by:
getCurrentEventType in interface EventContext

getCurrentGroupId

public Long getCurrentGroupId()
Specified by:
getCurrentGroupId in interface EventContext

getCurrentGroupName

public String getCurrentGroupName()
Specified by:
getCurrentGroupName in interface EventContext

getCurrentUserId

public Long getCurrentUserId()
Specified by:
getCurrentUserId in interface EventContext

getCurrentUserName

public String getCurrentUserName()
Specified by:
getCurrentUserName in interface EventContext

getLeaderOfGroupsList

public List<Long> getLeaderOfGroupsList()
Specified by:
getLeaderOfGroupsList in interface EventContext

getMemberOfGroupsList

public List<Long> getMemberOfGroupsList()
Specified by:
getMemberOfGroupsList in interface EventContext

isCurrentUserAdmin

public boolean isCurrentUserAdmin()
Specified by:
isCurrentUserAdmin in interface EventContext

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface EventContext

getCurrentUmask

public ome.model.internal.Permissions getCurrentUmask()
Specified by:
getCurrentUmask in interface EventContext


OmeroJava Api

Version: Beta-4.1.1-r5927-b91

Copyright © 2009 The University of Dundee. All Rights Reserved.