public interface SubjectData
Subject
Modifier and Type | Field and Description |
---|---|
static Set<Context> |
GLOBAL_CONTEXT
A convenience constant for the global context combination (the empty
set), if you want your code to look especially fancy.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addParent(Set<Context> contexts,
Subject parent)
Adds a parent in a particular context combination.
|
boolean |
clearParents()
Remove all parents in any context combination.
|
boolean |
clearParents(Set<Context> contexts)
Remove all parents in a given context combination.
|
boolean |
clearPermissions()
Clear all permissions set in any context.
|
boolean |
clearPermissions(Set<Context> contexts)
Clear all permissions set in a given context combination.
|
Map<Set<Context>,List<Subject>> |
getAllParents()
Return all registered parent subjects for all contexts.
|
Map<Set<Context>,Map<String,Boolean>> |
getAllPermissions()
Return all permissions associated with this data object.
|
List<Subject> |
getParents(Set<Context> contexts)
Return all registered parent subjects for a given context.
|
Map<String,Boolean> |
getPermissions(Set<Context> contexts)
Returns the list of permissions set for the given context.
|
boolean |
removeParent(Set<Context> contexts,
Subject parent)
Removes a parent in a particular context combination.
|
boolean |
setPermission(Set<Context> contexts,
String permission,
Tristate value)
Set a permission to a given value.
|
Map<Set<Context>,Map<String,Boolean>> getAllPermissions()
Map<String,Boolean> getPermissions(Set<Context> contexts)
contexts
- The particular context combination to checkboolean setPermission(Set<Context> contexts, String permission, Tristate value)
Tristate.UNDEFINED
unsets the permission. An empty set of
contexts applies this permission to the global context.contexts
- The particular combination of contexts to set this
permission inpermission
- The permission to setvalue
- The value to set this permission toboolean clearPermissions()
boolean clearPermissions(Set<Context> contexts)
contexts
- The context combination to clear permissions inMap<Set<Context>,List<Subject>> getAllParents()
List<Subject> getParents(Set<Context> contexts)
contexts
- The context to checkboolean addParent(Set<Context> contexts, Subject parent)
contexts
- The context combination this operation is applicable toparent
- The name of the parent to addboolean removeParent(Set<Context> contexts, Subject parent)
contexts
- The context combination this operation is applicable toparent
- The name of the parent to removeboolean clearParents()