public class BasicEventContext
extends ome.system.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
Constructor and Description |
---|
BasicEventContext(ome.system.Principal p,
SessionStats stats) |
BasicEventContext(ome.system.Principal p,
SessionStats stats,
ome.system.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 |
---|---|
java.util.Set<ome.model.enums.AdminPrivilege> |
getAdminPrivileges() |
java.util.Map<java.lang.String,java.lang.String> |
getCallContext() |
java.util.Set<java.lang.String> |
getDisabledSubsystems() |
ome.model.meta.Event |
getEvent() |
ome.model.meta.ExperimenterGroup |
getGroup() |
java.util.List<java.lang.Long> |
getLeaderOfGroupsList() |
java.util.Set<ome.model.IObject> |
getLockCandidates() |
java.util.List<ome.model.meta.EventLog> |
getLogs() |
java.util.List<java.lang.Long> |
getMemberOfGroupsList() |
ome.model.meta.Experimenter |
getOwner() |
ome.model.internal.Permissions |
getPermissionsForGroup(java.lang.Long group)
Never returns
Permissions.DUMMY . |
ome.system.Principal |
getPrincipal() |
java.util.Set<RegisterServiceCleanupMessage> |
getServiceCleanups() |
SessionStats |
getStats() |
ome.model.meta.Experimenter |
getSudoer() |
void |
loadPermissions(org.hibernate.Session session) |
void |
setAdmin(boolean admin) |
void |
setAdminPrivileges(java.util.Set<ome.model.enums.AdminPrivilege> adminPrivileges) |
java.util.Map<java.lang.String,java.lang.String> |
setCallContext(java.util.Map<java.lang.String,java.lang.String> ctx) |
void |
setDisabledSubsystems(java.util.Set<java.lang.String> disabledSubsystems) |
void |
setEvent(ome.model.meta.Event event) |
void |
setGroup(ome.model.meta.ExperimenterGroup group,
ome.model.internal.Permissions p) |
void |
setLeaderOfGroups(java.util.List<java.lang.Long> groupIds) |
void |
setLockCandidates(java.util.Set<ome.model.IObject> lockCandidates) |
void |
setLogs(java.util.List<ome.model.meta.EventLog> logs) |
void |
setMemberOfGroups(java.util.List<java.lang.Long> groupIds) |
void |
setOwner(ome.model.meta.Experimenter owner) |
ome.model.internal.Permissions |
setPermissionsForGroup(java.lang.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(java.util.Set<RegisterServiceCleanupMessage> serviceCleanups) |
void |
setShareId(java.lang.Long id) |
void |
setSudoer(ome.model.meta.Experimenter sudoer) |
void |
setUmask(ome.model.internal.Permissions umask) |
java.lang.String |
toString() |
copy, getCurrentAdminPrivileges, getCurrentEventId, getCurrentEventType, getCurrentGroupId, getCurrentGroupName, getCurrentGroupPermissions, getCurrentSessionId, getCurrentSessionUuid, getCurrentShareId, getCurrentSudoerId, getCurrentSudoerName, getCurrentUmask, getCurrentUserId, getCurrentUserName, isCurrentUserAdmin, isReadOnly, setGroupPermissions
public BasicEventContext(ome.system.Principal p, SessionStats stats)
public BasicEventContext(ome.system.Principal p, SessionStats stats, ome.system.EventContext ec)
SimpleEventContext.copy(EventContext)
or copyContext(EventContext)
out of the EventContext
hierarchy.public java.util.Map<java.lang.String,java.lang.String> getCallContext()
public java.util.Map<java.lang.String,java.lang.String> setCallContext(java.util.Map<java.lang.String,java.lang.String> ctx)
public void setUmask(ome.model.internal.Permissions umask)
public void setAdmin(boolean admin)
public void setAdminPrivileges(java.util.Set<ome.model.enums.AdminPrivilege> adminPrivileges)
public java.util.Set<ome.model.enums.AdminPrivilege> getAdminPrivileges()
public void setReadOnly(boolean readOnly)
public void setShareId(java.lang.Long id)
public ome.system.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.Experimenter getSudoer()
public void setSudoer(ome.model.meta.Experimenter sudoer)
public ome.model.meta.ExperimenterGroup getGroup()
public void setGroup(ome.model.meta.ExperimenterGroup group, ome.model.internal.Permissions p)
public java.util.Set<java.lang.String> getDisabledSubsystems()
public void setDisabledSubsystems(java.util.Set<java.lang.String> disabledSubsystems)
public java.util.Set<RegisterServiceCleanupMessage> getServiceCleanups()
public void setServiceCleanups(java.util.Set<RegisterServiceCleanupMessage> serviceCleanups)
public java.util.Set<ome.model.IObject> getLockCandidates()
public void setLockCandidates(java.util.Set<ome.model.IObject> lockCandidates)
public java.util.List<ome.model.meta.EventLog> getLogs()
public void setLogs(java.util.List<ome.model.meta.EventLog> logs)
public java.util.List<java.lang.Long> getMemberOfGroupsList()
getMemberOfGroupsList
in interface ome.system.EventContext
getMemberOfGroupsList
in class ome.system.SimpleEventContext
public java.util.List<java.lang.Long> getLeaderOfGroupsList()
getLeaderOfGroupsList
in interface ome.system.EventContext
getLeaderOfGroupsList
in class ome.system.SimpleEventContext
public void setMemberOfGroups(java.util.List<java.lang.Long> groupIds)
public void setLeaderOfGroups(java.util.List<java.lang.Long> groupIds)
public ome.model.internal.Permissions getPermissionsForGroup(java.lang.Long group)
Permissions.DUMMY
.group
- a group ID, may be null
null
public ome.model.internal.Permissions setPermissionsForGroup(java.lang.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.group
- a group ID, not null
perms
- the group's permissionsnull
if none are notedpublic void loadPermissions(org.hibernate.Session session)
public java.lang.String toString()
toString
in class java.lang.Object