public class BasicEventContext extends SimpleEventContext
EventContext
implementation for use within the security system. Holds
various other information needed for proper functioning of a Thread
.
Not-thread-safe. Intended to be held by a ThreadLocal
ceId, ceType, cgId, cgName, csId, csName, cuId, cuName, isAdmin, isReadOnly, leaderOfGroups, memberOfGroups, shareId, umask
Constructor and Description |
---|
BasicEventContext(Principal p,
SessionStats stats) |
BasicEventContext(Principal p,
SessionStats stats,
EventContext ec)
Copy-constructor to not have to allow the mutator
SimpleEventContext.copy(EventContext)
or copyContext(EventContext) out of the EventContext
hierarchy. |
copy, getCurrentEventId, getCurrentEventType, getCurrentGroupId, getCurrentGroupName, getCurrentGroupPermissions, getCurrentSessionId, getCurrentSessionUuid, getCurrentShareId, getCurrentUmask, getCurrentUserId, getCurrentUserName, isCurrentUserAdmin, isReadOnly, setGroupPermissions
public BasicEventContext(Principal p, SessionStats stats)
public BasicEventContext(Principal p, SessionStats stats, EventContext ec)
SimpleEventContext.copy(EventContext)
or copyContext(EventContext)
out of the EventContext
hierarchy.public void setUmask(Permissions umask)
public void setAdmin(boolean admin)
public void setReadOnly(boolean readOnly)
public void setShareId(Long id)
public Principal getPrincipal()
public SessionStats getStats()
public Event getEvent()
public void setEvent(Event event)
public Experimenter getOwner()
public void setOwner(Experimenter owner)
public ExperimenterGroup getGroup()
public void setGroup(ExperimenterGroup group, Permissions p)
public Set<RegisterServiceCleanupMessage> getServiceCleanups()
public void setServiceCleanups(Set<RegisterServiceCleanupMessage> serviceCleanups)
public List<Long> getMemberOfGroupsList()
getMemberOfGroupsList
in interface EventContext
getMemberOfGroupsList
in class SimpleEventContext
public List<Long> getLeaderOfGroupsList()
getLeaderOfGroupsList
in interface EventContext
getLeaderOfGroupsList
in class SimpleEventContext
public Permissions getPermissionsForGroup(Long group)
Permissions.DUMMY
.group
- a group ID, may be null
null
public Permissions setPermissionsForGroup(Long group, Permissions perms)
BasicACLVoter.allowLoad(org.hibernate.Session, Class, ome.model.internal.Details, long)
to track groups that will need resolving later.group
- a group ID, not null
perms
- the group's permissionsnull
if none are notedpublic void loadPermissions(org.hibernate.Session session)
Version: 5.2.8-ice35-b57
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.