Interface SecurityLevelManager
-
public interface SecurityLevelManagerA SecurityLevelManager is the source of record for all SecurityLevels configured in the system
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSecurityLevelManager.ChangeEventSimple class to notify subscribers of the event bus that the security levels have changed
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.common.eventbus.EventBusgetEventBus()TheEventBuswhereChangeEventsare postedcom.google.common.collect.ImmutableCollection<SecurityLevelConfig>getSecurityLevelsConfig()Fetch allSecurityLevelConfigsin the systembooleanisAuthorized(com.google.common.collect.ImmutableCollection<SecurityLevelConfig> targets, com.google.common.collect.ImmutableCollection<SecurityLevelConfig> securityLevels, boolean isAllOf)Checks if the security levels are authorized against the target.voidupdateSecurityLevelsConfig(com.google.common.collect.ImmutableCollection<SecurityLevelConfig> updatedSecurityLevelsConfig)Update allSecurityLevelConfigsin the system
-
-
-
Method Detail
-
getSecurityLevelsConfig
@Nonnull com.google.common.collect.ImmutableCollection<SecurityLevelConfig> getSecurityLevelsConfig()
Fetch allSecurityLevelConfigsin the system
-
updateSecurityLevelsConfig
@Nonnull void updateSecurityLevelsConfig(@Nonnull com.google.common.collect.ImmutableCollection<SecurityLevelConfig> updatedSecurityLevelsConfig)Update allSecurityLevelConfigsin the system- Parameters:
updatedSecurityLevelsConfig- the new security levels config
-
isAuthorized
boolean isAuthorized(@Nonnull com.google.common.collect.ImmutableCollection<SecurityLevelConfig> targets, @Nonnull com.google.common.collect.ImmutableCollection<SecurityLevelConfig> securityLevels, boolean isAllOf)Checks if the security levels are authorized against the target. If isAllOf is true, each of the target security levels must be an ancestor of one of the given security levels. If isAllOf is false, at least one of the target security levels must be an ancestor of one of the given security levels.
-
getEventBus
@Nonnull com.google.common.eventbus.EventBus getEventBus()
TheEventBuswhereChangeEventsare posted
-
-