Class JexlSandbox.Permissions
java.lang.Object
org.apache.commons.jexl3.introspection.JexlSandbox.Permissions
- Enclosing class:
- JexlSandbox
Contains the allow or block lists for properties and methods for a given class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JexlSandbox.Names
The controlled methods.private final boolean
Whether these permissions are inheritable, ie can be used by derived classes.private final JexlSandbox.Names
The controlled readable properties.private final JexlSandbox.Names
The controlled writable properties. -
Constructor Summary
ConstructorsConstructorDescriptionPermissions
(boolean inherit, boolean readFlag, boolean writeFlag, boolean executeFlag) Creates a new permissions instance.Permissions
(boolean inherit, JexlSandbox.Names nread, JexlSandbox.Names nwrite, JexlSandbox.Names nexecute) Creates a new permissions instance. -
Method Summary
Modifier and TypeMethodDescription(package private) JexlSandbox.Permissions
copy()
execute()
Gets the set of method names in these permissions.Adds a list of executable methods names to these permissions.boolean
read()
Gets the set of readable property names in these permissions.Adds a list of readable property names to these permissions.write()
Gets the set of writable property names in these permissions.Adds a list of writable property names to these permissions.
-
Field Details
-
inheritable
private final boolean inheritableWhether these permissions are inheritable, ie can be used by derived classes. -
read
The controlled readable properties. -
write
The controlled writable properties. -
execute
The controlled methods.
-
-
Constructor Details
-
Permissions
Permissions(boolean inherit, boolean readFlag, boolean writeFlag, boolean executeFlag) Creates a new permissions instance.- Parameters:
inherit
- whether these permissions are inheritablereadFlag
- whether the read property list is allow or blockwriteFlag
- whether the write property list is allow or blockexecuteFlag
- whether the method list is allow of block
-
Permissions
Permissions(boolean inherit, JexlSandbox.Names nread, JexlSandbox.Names nwrite, JexlSandbox.Names nexecute) Creates a new permissions instance.- Parameters:
inherit
- whether these permissions are inheritablenread
- the read setnwrite
- the write setnexecute
- the method set
-
-
Method Details
-
copy
JexlSandbox.Permissions copy()- Returns:
- a copy of these permissions
-
isInheritable
public boolean isInheritable()- Returns:
- whether these permissions applies to derived classes.
-
read
Adds a list of readable property names to these permissions.- Parameters:
pnames
- the property names- Returns:
- this instance of permissions
-
write
Adds a list of writable property names to these permissions.- Parameters:
pnames
- the property names- Returns:
- this instance of permissions
-
execute
Adds a list of executable methods names to these permissions.The constructor is denoted as the empty-string, all other methods by their names.
- Parameters:
mnames
- the method names- Returns:
- this instance of permissions
-
read
Gets the set of readable property names in these permissions.- Returns:
- the set of property names
-
write
Gets the set of writable property names in these permissions.- Returns:
- the set of property names
-
execute
Gets the set of method names in these permissions.- Returns:
- the set of method names
-