@PublicAPI public class SelectionScript extends Script<Boolean>
Modifier and Type | Field and Description |
---|---|
protected byte[] |
hash
Hash digest of the script
|
static org.apache.log4j.Logger |
logger
Loggers
|
static String |
RESULT_VARIABLE
The variable name which must be set after the evaluation
of a verifying script.
|
ARGUMENTS_NAME, DEFAULT_OUTPUT_MAX_SIZE, id, MD5, parameters, script, scriptEngineLookupName, url
Constructor and Description |
---|
SelectionScript()
ProActive needed constructor
|
SelectionScript(File file,
Serializable[] parameters)
Create a selection script from a file.
|
SelectionScript(File file,
Serializable[] parameters,
boolean dynamic)
Create a selection script from a file.
|
SelectionScript(Script<?> script,
boolean dynamic)
Create a selection script from another selection script
|
SelectionScript(String script,
String engineName)
Directly create a script with a String.
|
SelectionScript(String script,
String engineName,
boolean dynamic)
Directly create a script with a string.
|
SelectionScript(String script,
String engineName,
Serializable[] parameters,
boolean dynamic)
Directly create a script with a string.
|
SelectionScript(URL url)
Create a selection script from an URL.
|
SelectionScript(URL url,
boolean dynamic)
Create a selection script from an URL.
|
SelectionScript(URL url,
Serializable[] parameters)
Create a selection script from an URL.
|
SelectionScript(URL url,
Serializable[] parameters,
boolean dynamic)
Create a selection script from an URL.
|
SelectionScript(URL url,
String engineName)
Create a selection script from an URL.
|
SelectionScript(URL url,
String engineName,
boolean dynamic)
Create a selection script from an URL.
|
SelectionScript(URL url,
String engineName,
Serializable[] parameters)
Create a selection script from an URL.
|
SelectionScript(URL url,
String engineName,
Serializable[] parameters,
boolean dynamic)
Create a selection script from an URL.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareByteArray(byte[] array1,
byte[] array2)
Compare two arrays of bytes
|
byte[] |
digest()
Get MD5 hash value
|
boolean |
equals(Object obj) |
protected String |
getDefaultScriptName() |
protected Reader |
getReader()
The reader used to read the script.
|
protected ScriptResult<Boolean> |
getResult(Object evalResult,
Bindings bindings)
SelectionScript must give its result in the 'result_script' variable.
|
int |
hashCode() |
boolean |
isDynamic()
Say if the script is static or dynamic
|
protected void |
prepareSpecialBindings(Bindings bindings)
There is no parameter to give to the selection script.
|
static SelectionScript |
resolvedSelectionScript(SelectionScript originalScript) |
String |
toString() |
createScriptEngine, digest, display, execute, execute, fetchScript, fetchScriptWithExceptionHandling, fetchUrlIfNeeded, getEngineName, getId, getOwner, getParameters, getScript, getScriptName, getScriptUrl, getSessionid, isLazyFetch, overrideDefaultScriptName, prepareBindings, readFile, setOwner, setScript, setSessionid
public static final org.apache.log4j.Logger logger
public static final String RESULT_VARIABLE
protected byte[] hash
public SelectionScript()
public SelectionScript(String script, String engineName) throws InvalidScriptException
script
- String representing a script codeengineName
- String a script execution engine.InvalidScriptException
- if the creation fails.public SelectionScript(String script, String engineName, boolean dynamic) throws InvalidScriptException
script
- String representing a script codeengineName
- String a script execution engine.dynamic
- tell if the script is dynamic or staticInvalidScriptException
- if the creation fails.public SelectionScript(String script, String engineName, Serializable[] parameters, boolean dynamic) throws InvalidScriptException
script
- String representing a script codeparameters
- script execution arguments.engineName
- String a script execution engine.dynamic
- tell if the script is dynamic or staticInvalidScriptException
- if the creation fails.public SelectionScript(File file, Serializable[] parameters) throws InvalidScriptException
file
- a file containing the scriptparameters
- script execution arguments.InvalidScriptException
- if the creation fails.public SelectionScript(File file, Serializable[] parameters, boolean dynamic) throws InvalidScriptException
file
- a file containing script codeparameters
- script execution arguments.dynamic
- tell if script is dynamic or staticInvalidScriptException
- if the creation fails.public SelectionScript(URL url) throws InvalidScriptException
url
- an URL representing a script codeInvalidScriptException
- if the creation failspublic SelectionScript(URL url, boolean dynamic) throws InvalidScriptException
url
- an URL representing a script codeInvalidScriptException
- if the creation failspublic SelectionScript(URL url, String engineName) throws InvalidScriptException
url
- an URL representing a script codeengineName
- script's engine execution name.InvalidScriptException
- if the creation failspublic SelectionScript(URL url, String engineName, boolean dynamic) throws InvalidScriptException
url
- an URL representing a script codeengineName
- script's engine execution name.dynamic
- true if the script is dynamicInvalidScriptException
- if the creation failspublic SelectionScript(URL url, Serializable[] parameters) throws InvalidScriptException
url
- an URL representing a script codeparameters
- script execution argument.InvalidScriptException
- if the creation failspublic SelectionScript(URL url, Serializable[] parameters, boolean dynamic) throws InvalidScriptException
url
- an URL representing a script codeparameters
- execution argumentsdynamic
- true if the script is dynamicInvalidScriptException
- if the creation fails.public SelectionScript(URL url, String engineName, Serializable[] parameters) throws InvalidScriptException
url
- an URL representing a script codeengineName
- script's engine execution name.parameters
- script execution argument.InvalidScriptException
- if the creation failspublic SelectionScript(URL url, String engineName, Serializable[] parameters, boolean dynamic) throws InvalidScriptException
url
- an URL representing a script codeengineName
- script's engine execution name.parameters
- execution argumentsdynamic
- true if the script is dynamicInvalidScriptException
- if the creation fails.public SelectionScript(Script<?> script, boolean dynamic) throws InvalidScriptException
script
- selection script sourcedynamic
- true if the script is dynamicInvalidScriptException
- if the creation fails.protected String getDefaultScriptName()
getDefaultScriptName
in class Script<Boolean>
public static SelectionScript resolvedSelectionScript(SelectionScript originalScript)
protected Reader getReader()
Script
protected ScriptResult<Boolean> getResult(Object evalResult, Bindings bindings)
getResult
in class Script<Boolean>
Script.getResult(Object, Bindings)
public boolean isDynamic()
protected void prepareSpecialBindings(Bindings bindings)
prepareSpecialBindings
in class Script<Boolean>
public int hashCode()
hashCode
in class Script<Boolean>
Object.hashCode()
public boolean compareByteArray(byte[] array1, byte[] array2)
array1
- first array to comparearray2
- second array to comparepublic byte[] digest() throws NoSuchAlgorithmException
NoSuchAlgorithmException