java.lang.Object
java.security.Permission
java.security.BasicPermission
org.bzdev.scripting.ScriptingContextPermission
- All Implemented Interfaces:
Serializable
,Guard
Deprecated.
The security manager is being removed from Java
Permission to allow the construction of a ScriptingContext or to call
the ScriptingContext methods setReader or setWriter,
setErrorWriter, or createBindingSwapper to be called.
This permission allows specific subclasses of ScriptingContext to
be constructed even if a security manager has been installed. It is
intended for users of the BZDev library. The actions string should
be either empty or comma-separated tokens whose values can be
- "trusted", which implies the ability to construct a trusted scripting context. When trusted, scripts will be evaluated with no additional access control; otherwise they are evaluated with no permissions.
- "swapbindings", which implies that the ScriptingContext method createBindingSwapper to be used.
- "privileged", which implies that the additional privileges are available for the ScriptingContext methods evalScriptPrivileged, doScriptPrivileged, doScriptPrivilegedReturns, and invokePrivateFunction when its second argument is ScriptingContext.PFMode.PRIVILEGED. These additional privileges are the ones granted to the target class' code base. Without this permission, no privileges are granted to these methods.
In order to create a subclass of ScriptingContext, both the BZDev library code base and the code base of the scripting context subclass must have a ScriptingContextPermission for the subclass.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructor.ScriptingContextPermission
(String name, String actions) Deprecated.Constructor with actions. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.boolean
Deprecated.Methods inherited from class java.security.BasicPermission
equals, hashCode, newPermissionCollection
Methods inherited from class java.security.Permission
checkGuard, getName, toString
-
Constructor Details
-
ScriptingContextPermission
Deprecated.Constructor.- Parameters:
name
- the fully qualified class name of the subclass of ScriptingContext that will be constructed, or the class names java.io.Reader or java.io.Writer
-
ScriptingContextPermission
Deprecated.Constructor with actions. When the actions string has the value "trusted", that indicates that a subclass of ScriptingContext may be instantiated with a constructor that sets a 'trusted' argument to true.- Parameters:
name
- the fully qualified class name of the subclass of ScriptingContext that will be constructed, or the class names java.io.Reader or java.io.Writeractions
- either an empty string, mandatory when name is java.io.Reader or java.io.Writer, or a string made up of any of the comma-separated tokens "trusted", "swapbindings", or "privileged"- Throws:
IllegalArgumentException
- the actions argument had an illegal value
-
-
Method Details
-
getActions
Deprecated.- Overrides:
getActions
in classBasicPermission
-
implies
Deprecated.- Overrides:
implies
in classBasicPermission
-