@Immutable public class Contexts extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVER_KEY
The context key used to denote the subjects server
|
static String |
WORLD_KEY
The context key used to denote the subjects world
|
| Modifier | Constructor and Description |
|---|---|
|
Contexts(ContextSet contextSet,
boolean includeNodesSetWithoutServer,
boolean includeNodesSetWithoutWorld,
boolean resolveInheritance,
boolean applyParentsWithoutServer,
boolean applyParentsWithoutWorld,
boolean isOp)
Deprecated.
|
protected |
Contexts(ImmutableContextSet contextSet,
ImmutableSet<LookupSetting> settings) |
| Modifier and Type | Method and Description |
|---|---|
static Contexts |
allowAll()
Gets the
FullySatisfiedContexts instance. |
boolean |
equals(Object o) |
ContextSet |
getContexts()
Gets the
ContextSet which represent these Contexts. |
Set<LookupSetting> |
getSettings()
Gets the set of
LookupSettings which represent these Contexts. |
static Contexts |
global()
Returns a 'global' or default contexts instance.
|
int |
hashCode() |
boolean |
hasSetting(LookupSetting setting)
Gets if the given
LookupSetting is set. |
boolean |
isApplyGlobalGroups()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isApplyGlobalWorldGroups()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isApplyGroups()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isIncludeGlobal()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isIncludeGlobalWorld()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isOp()
Deprecated.
in favour of
hasSetting(LookupSetting) |
static Contexts |
of(ContextSet contextSet,
boolean includeNodesSetWithoutServer,
boolean includeNodesSetWithoutWorld,
boolean resolveInheritance,
boolean applyParentsWithoutServer,
boolean applyParentsWithoutWorld,
boolean isOp)
Creates a new
Contexts instance. |
static Contexts |
of(ContextSet contextSet,
Set<LookupSetting> settings)
Creates a new
Contexts instance. |
String |
toString() |
public static final String SERVER_KEY
public static final String WORLD_KEY
@Deprecated public Contexts(@Nonnull ContextSet contextSet, boolean includeNodesSetWithoutServer, boolean includeNodesSetWithoutWorld, boolean resolveInheritance, boolean applyParentsWithoutServer, boolean applyParentsWithoutWorld, boolean isOp)
of(ContextSet, boolean, boolean, boolean, boolean, boolean, boolean)Contexts instance.contextSet - the context setincludeNodesSetWithoutServer - the value of LookupSetting.INCLUDE_NODES_SET_WITHOUT_SERVERincludeNodesSetWithoutWorld - the value of LookupSetting.INCLUDE_NODES_SET_WITHOUT_WORLDresolveInheritance - the value of LookupSetting.RESOLVE_INHERITANCEapplyParentsWithoutServer - the value of LookupSetting.APPLY_PARENTS_SET_WITHOUT_SERVERapplyParentsWithoutWorld - the value of LookupSetting.APPLY_PARENTS_SET_WITHOUT_WORLDisOp - the value of LookupSetting.IS_OPprotected Contexts(@Nonnull ImmutableContextSet contextSet, @Nonnull ImmutableSet<LookupSetting> settings)
@Nonnull public static Contexts allowAll()
FullySatisfiedContexts instance.@Nonnull public static Contexts global()
Formed of an empty ContextSet and all inclusion and
inheritance LookupSettings applied.
@Nonnull public static Contexts of(@Nonnull ContextSet contextSet, boolean includeNodesSetWithoutServer, boolean includeNodesSetWithoutWorld, boolean resolveInheritance, boolean applyParentsWithoutServer, boolean applyParentsWithoutWorld, boolean isOp)
Contexts instance.contextSet - the context setincludeNodesSetWithoutServer - the value of LookupSetting.INCLUDE_NODES_SET_WITHOUT_SERVERincludeNodesSetWithoutWorld - the value of LookupSetting.INCLUDE_NODES_SET_WITHOUT_WORLDresolveInheritance - the value of LookupSetting.RESOLVE_INHERITANCEapplyParentsWithoutServer - the value of LookupSetting.APPLY_PARENTS_SET_WITHOUT_SERVERapplyParentsWithoutWorld - the value of LookupSetting.APPLY_PARENTS_SET_WITHOUT_WORLDisOp - the value of LookupSetting.IS_OPpublic static Contexts of(@Nonnull ContextSet contextSet, @Nonnull Set<LookupSetting> settings)
Contexts instance.contextSet - the context setsettings - the settings@Nonnull public ContextSet getContexts()
ContextSet which represent these Contexts.@Nonnull public Set<LookupSetting> getSettings()
LookupSettings which represent these Contexts.public boolean hasSetting(@Nonnull LookupSetting setting)
LookupSetting is set.setting - the setting@Deprecated public boolean isOp()
hasSetting(LookupSetting)LookupSetting.IS_OP.LookupSetting.IS_OP@Deprecated public boolean isIncludeGlobal()
hasSetting(LookupSetting)LookupSetting.INCLUDE_NODES_SET_WITHOUT_SERVER.LookupSetting.INCLUDE_NODES_SET_WITHOUT_SERVER@Deprecated public boolean isIncludeGlobalWorld()
hasSetting(LookupSetting)LookupSetting.INCLUDE_NODES_SET_WITHOUT_WORLD.LookupSetting.INCLUDE_NODES_SET_WITHOUT_WORLD@Deprecated public boolean isApplyGroups()
hasSetting(LookupSetting)LookupSetting.RESOLVE_INHERITANCE.LookupSetting.RESOLVE_INHERITANCE@Deprecated public boolean isApplyGlobalGroups()
hasSetting(LookupSetting)LookupSetting.APPLY_PARENTS_SET_WITHOUT_SERVER.LookupSetting.APPLY_PARENTS_SET_WITHOUT_SERVER@Deprecated public boolean isApplyGlobalWorldGroups()
hasSetting(LookupSetting)LookupSetting.APPLY_PARENTS_SET_WITHOUT_WORLD.LookupSetting.APPLY_PARENTS_SET_WITHOUT_WORLDCopyright © 2018. All rights reserved.