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. |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getCallContext() |
Set<String> |
getDisabledSubsystems() |
ome.model.meta.Event |
getEvent() |
ome.model.meta.ExperimenterGroup |
getGroup() |
List<Long> |
getLeaderOfGroupsList() |
Set<ome.model.IObject> |
getLockCandidates() |
List<ome.model.meta.EventLog> |
getLogs() |
List<Long> |
getMemberOfGroupsList() |
ome.model.meta.Experimenter |
getOwner() |
ome.model.internal.Permissions |
getPermissionsForGroup(Long group)
Never returns
Permissions.DUMMY . |
Principal |
getPrincipal() |
Set<RegisterServiceCleanupMessage> |
getServiceCleanups() |
SessionStats |
getStats() |
void |
loadPermissions(org.hibernate.Session session) |
void |
setAdmin(boolean admin) |
Map<String,String> |
setCallContext(Map<String,String> ctx) |
void |
setDisabledSubsystems(Set<String> disabledSubsystems) |
void |
setEvent(ome.model.meta.Event event) |
void |
setGroup(ome.model.meta.ExperimenterGroup group,
ome.model.internal.Permissions p) |
void |
setLeaderOfGroups(List<Long> groupIds) |
void |
setLockCandidates(Set<ome.model.IObject> lockCandidates) |
void |
setLogs(List<ome.model.meta.EventLog> logs) |
void |
setMemberOfGroups(List<Long> groupIds) |
void |
setOwner(ome.model.meta.Experimenter owner) |
ome.model.internal.Permissions |
setPermissionsForGroup(Long group,
ome.model.internal.Permissions perms)
Called during
BasicACLVoter.allowLoad(org.hibernate.Session, Class, ome.model.internal.Details, long)
to track groups that will need resolving later. |
void |
setReadOnly(boolean readOnly) |
void |
setServiceCleanups(Set<RegisterServiceCleanupMessage> serviceCleanups) |
void |
setShareId(Long id) |
void |
setUmask(ome.model.internal.Permissions umask) |
String |
toString() |
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.p
- stats
- ec
- public void setUmask(ome.model.internal.Permissions umask)
public void setAdmin(boolean admin)
public void setReadOnly(boolean readOnly)
public void setShareId(Long id)
public Principal getPrincipal()
public SessionStats getStats()
public ome.model.meta.Event getEvent()
public void setEvent(ome.model.meta.Event event)
public ome.model.meta.Experimenter getOwner()
public void setOwner(ome.model.meta.Experimenter owner)
public ome.model.meta.ExperimenterGroup getGroup()
public void setGroup(ome.model.meta.ExperimenterGroup group, ome.model.internal.Permissions p)
public Set<RegisterServiceCleanupMessage> getServiceCleanups()
public void setServiceCleanups(Set<RegisterServiceCleanupMessage> serviceCleanups)
public Set<ome.model.IObject> getLockCandidates()
public void setLockCandidates(Set<ome.model.IObject> lockCandidates)
public List<ome.model.meta.EventLog> getLogs()
public void setLogs(List<ome.model.meta.EventLog> logs)
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 ome.model.internal.Permissions getPermissionsForGroup(Long group)
Permissions.DUMMY
.public ome.model.internal.Permissions setPermissionsForGroup(Long group, ome.model.internal.Permissions perms)
BasicACLVoter.allowLoad(org.hibernate.Session, Class, ome.model.internal.Details, long)
to track groups that will need resolving later.public void loadPermissions(org.hibernate.Session session)
Version: 5.1.2-ice35-b45
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.