Package org.elasticsearch.script
Class ClassPermission
java.lang.Object
java.security.Permission
java.security.BasicPermission
org.elasticsearch.script.ClassPermission
- All Implemented Interfaces:
java.io.Serializable
,java.security.Guard
public final class ClassPermission
extends java.security.BasicPermission
Checked by scripting engines to allow loading a java class.
Examples:
Allow permission to java.util.List
permission org.elasticsearch.script.ClassPermission "java.util.List";Allow permission to classes underneath
java.util
(and its subpackages such as java.util.zip
)
permission org.elasticsearch.script.ClassPermission "java.util.*";Allow permission to standard predefined list of basic classes (see list below)
permission org.elasticsearch.script.ClassPermission "<<STANDARD>>";Allow permission to all classes
permission org.elasticsearch.script.ClassPermission "*";
Set of classes (allowed by special value <<STANDARD>>
):
Boolean
Byte
Character
Double
Integer
Long
Math
Object
Short
String
BigDecimal
ArrayList
Arrays
Date
HashMap
HashSet
Iterator
List
Map
Set
UUID
DateTime
DateTimeUtils
DateTimeZone
Instant
ReadableDateTime
ReadableInstant
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
STANDARD
static java.util.Set<java.lang.String>
STANDARD_CLASSES
Typical set of classes for scripting: basic data types, math, dates, and simple collections -
Constructor Summary
Constructors Constructor Description ClassPermission(java.lang.String name)
Creates a new ClassPermission object.ClassPermission(java.lang.String name, java.lang.String actions)
Creates a new ClassPermission object. -
Method Summary
Modifier and Type Method Description boolean
implies(java.security.Permission p)
java.security.PermissionCollection
newPermissionCollection()
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode
Methods inherited from class java.security.Permission
checkGuard, getName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
STANDARD
public static final java.lang.String STANDARD- See Also:
- Constant Field Values
-
STANDARD_CLASSES
public static final java.util.Set<java.lang.String> STANDARD_CLASSESTypical set of classes for scripting: basic data types, math, dates, and simple collections
-
-
Constructor Details
-
ClassPermission
public ClassPermission(java.lang.String name)Creates a new ClassPermission object.- Parameters:
name
- class to grant permission to
-
ClassPermission
public ClassPermission(java.lang.String name, java.lang.String actions)Creates a new ClassPermission object. This constructor exists for use by thePolicy
object to instantiate new Permission objects.- Parameters:
name
- class to grant permission toactions
- ignored
-
-
Method Details
-
implies
public boolean implies(java.security.Permission p)- Overrides:
implies
in classjava.security.BasicPermission
-
newPermissionCollection
public java.security.PermissionCollection newPermissionCollection()- Overrides:
newPermissionCollection
in classjava.security.BasicPermission
-