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
adminPrivileges, ceId, ceType, cgId, cgName, csId, csName, csuId, csuName, 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 |
---|---|
java.util.Set<AdminPrivilege> |
getAdminPrivileges() |
java.util.Map<java.lang.String,java.lang.String> |
getCallContext() |
java.util.Set<java.lang.String> |
getDisabledSubsystems() |
Event |
getEvent() |
ExperimenterGroup |
getGroup() |
java.util.List<java.lang.Long> |
getLeaderOfGroupsList() |
java.util.Set<IObject> |
getLockCandidates() |
java.util.List<EventLog> |
getLogs() |
java.util.List<java.lang.Long> |
getMemberOfGroupsList() |
Experimenter |
getOwner() |
Permissions |
getPermissionsForGroup(java.lang.Long group)
Never returns
Permissions.DUMMY . |
Principal |
getPrincipal() |
java.util.Set<RegisterServiceCleanupMessage> |
getServiceCleanups() |
SessionStats |
getStats() |
Experimenter |
getSudoer() |
void |
loadPermissions(org.hibernate.Session session) |
void |
setAdmin(boolean admin) |
void |
setAdminPrivileges(java.util.Set<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(Event event) |
void |
setGroup(ExperimenterGroup group,
Permissions p) |
void |
setLeaderOfGroups(java.util.List<java.lang.Long> groupIds) |
void |
setLockCandidates(java.util.Set<IObject> lockCandidates) |
void |
setLogs(java.util.List<EventLog> logs) |
void |
setMemberOfGroups(java.util.List<java.lang.Long> groupIds) |
void |
setOwner(Experimenter owner) |
Permissions |
setPermissionsForGroup(java.lang.Long group,
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(Experimenter sudoer) |
void |
setUmask(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(Principal p, SessionStats stats)
public BasicEventContext(Principal p, SessionStats stats, 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(Permissions umask)
public void setAdmin(boolean admin)
public void setAdminPrivileges(java.util.Set<AdminPrivilege> adminPrivileges)
public java.util.Set<AdminPrivilege> getAdminPrivileges()
public void setReadOnly(boolean readOnly)
public void setShareId(java.lang.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 Experimenter getSudoer()
public void setSudoer(Experimenter sudoer)
public ExperimenterGroup getGroup()
public void setGroup(ExperimenterGroup group, 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<IObject> getLockCandidates()
public void setLockCandidates(java.util.Set<IObject> lockCandidates)
public java.util.List<EventLog> getLogs()
public void setLogs(java.util.List<EventLog> logs)
public java.util.List<java.lang.Long> getMemberOfGroupsList()
getMemberOfGroupsList
in interface EventContext
getMemberOfGroupsList
in class SimpleEventContext
public java.util.List<java.lang.Long> getLeaderOfGroupsList()
getLeaderOfGroupsList
in interface EventContext
getLeaderOfGroupsList
in class SimpleEventContext
public void setMemberOfGroups(java.util.List<java.lang.Long> groupIds)
public void setLeaderOfGroups(java.util.List<java.lang.Long> groupIds)
public Permissions getPermissionsForGroup(java.lang.Long group)
Permissions.DUMMY
.group
- a group ID, may be null
null
public Permissions setPermissionsForGroup(java.lang.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)
public java.lang.String toString()
toString
in class java.lang.Object
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.