public interface ISessionScript
| Variable/Function | Description |
|---|---|
| arguments | Contains the arguments passed to the script. |
| environment | Returns the current environment object. |
| help() | Display usage and help messages. |
| load(["foo.js",...]) | Load JavaScript source files name by string arguments. |
| loadClass(className) | Load a class named by a string argument. The class must be a script compiled to a class file. |
| print([expr ...]) | Evaluate and print expressions to console. |
| importPackage(package) | Provides functionality similar to Java's "import" statement. |
| quit() | Stop execution of the current script environment. |
| version([number]) | Get or set the JavaScript version number. |
| gc() | Runs the garbage collector. |
| spawn(arg) | Evaluate function or script name on a new thread. |
| sync(function [,obj]) | Creates a synchronized version of the function, where the synchronization object is the obj argument or "this" if obj is undefined. |
| readFile(fileName [,encoding]) | Returns the content of the file as a string. Encoding of the string can be optionally specified. |
| readUrl(url [,encoding]) | Similar to readFile, reads the contents of the url. |
| runCommand(name ...) | Runs a specified shell command. Additional arguments are passed to the command. |
| seal(args ...) | Seals the supplied objects (so they may not be modified - read-only). |
| toint32(arg) | Converts the argument into a 32-bit integer. |
| serialize(obj, fileName) | Serializes an object and saves it to a file. |
| deserialize(fileName) | Reconstructs a serialized object. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activeIO(java.lang.String path)
Indicates if the file is currently being input/output by VersaLex
|
java.lang.String |
applyDefaultBox(java.lang.String local,
boolean inbox)
If local is a relative path, apply the default inbox/outbox settings
|
void |
debug(java.lang.String debugMessage)
Write a message to the system debug
|
java.lang.String |
decode(java.lang.String string)
Decode a protected string
|
java.lang.String |
decrypt(java.lang.String string)
Decrypt a protected string
|
java.lang.String |
encode(java.lang.String string)
Encode a protected string
|
java.lang.String |
encrypt(java.lang.String string)
Encrypt a protected string
|
boolean |
executeActionCommand(java.lang.String command)
Execute a command via the current running action.
|
java.io.File |
getAbsolute(java.io.File file)
If file path is not an absolute path, then constructs one from the VersaLex
user directory
|
java.lang.String |
getAbsolute(java.lang.String path)
If file path is not an absolute path, then constructs one from the VersaLex
user directory
|
IActionController |
getActionController()
Get this action's controller
|
IActionController |
getActionController(java.lang.String[] path)
Get an action controller for another host\\mailbox\\action.
|
ICertManagerRunTime |
getCertManager()
Get a VersaLex Certificate Manager object
|
com.cleo.users.ConnectedUsers.UserSession[] |
getConnectedUsers()
Get the connected users sessions
|
int |
getHostProtocol()
Returns the protocol for the host
|
IncomingFilters |
getIncomingFilters()
Add/list/remove incoming filters
|
ILicense |
getLicense()
Get the current VersaLex License
|
ILicenser |
getLicenser()
Get a VersaLex Licenser object
|
LogListeners |
getLogListeners()
Add/list/remove log listeners
|
IMailboxController |
getMailboxController()
Get the parent mailbox controller
|
IMailboxController |
getMailboxController(java.lang.String[] path)
Get a mailbox controller for another host\\mailbox.
|
int |
getMailboxPackaging()
Returns the packaging for the mailbox
|
Options |
getOptions()
Get the system options
|
java.lang.String[] |
getProperty(int type,
java.lang.String property)
Get property value(s)
|
java.io.File |
getRelative(java.io.File file)
If file path is an absolute path from the VersaLex user directory, then changes
to a relative path
|
java.lang.String |
getRelative(java.lang.String path)
If file path is an absolute path from the VersaLex user directory, then changes
to a relative path
|
LexiComOutgoing[] |
getResends()
Get object(s) to be resent.
|
ISyncer |
getSyncer()
Get a VersaLex Synchronizer object
|
Trigger |
getTrigger()
Get the event trigger which initiated execution of the script.
|
java.lang.String |
getVersion()
Get the VersaLex version
|
boolean |
hasProperty(int type,
java.lang.String property)
Check if property exists
|
boolean |
isLocal()
Indicates whether the host is a local host
|
boolean |
isResending()
Indicates whether this action is resend run type.
|
void |
logDetail(java.lang.String logMessage)
Write a message to the XML log relative to this script instance
|
void |
logDetail(java.lang.String logMessage,
int level,
java.lang.String color)
Write a message to the XML log relative to this script instance
|
java.lang.Object |
runScriptAction(java.lang.String[] path,
java.lang.String... args)
Run a (Java)script action
|
java.lang.Object |
runScriptAction(java.lang.String alias,
java.lang.String... args)
Run a (Java)script action
|
void |
setProperty(int type,
java.lang.String property,
java.lang.String value)
Set property value
Warning: The set value is changed in memory and saved permanently when the action finishes.
|
void |
setProperty(int type,
java.lang.String property,
java.lang.String[] value)
Set property values
Warning: The set value is changed in memory and saved permanently when the action finishes.
|
boolean hasProperty(int type,
java.lang.String property)
throws java.lang.Exception
type - either HOST, MAILBOX, ACTION, or HOST_ACTIONproperty - the property name requestedjava.lang.Exceptionjava.lang.String[] getProperty(int type,
java.lang.String property)
throws java.lang.Exception
type - either HOST, MAILBOX, ACTION, or HOST_ACTIONproperty - the property name requestedjava.lang.Exceptionvoid setProperty(int type,
java.lang.String property,
java.lang.String value)
throws java.lang.Exception
Warning: The set value is changed in memory and saved permanently when the action finishes. This means that setProperty() can reliably be used only if - actions are not allowed to run concurrently OR - for a mailbox property there is only one action in the mailbox OR - for a host property there is only one action in the host.
type - either HOST, MAILBOX, ACTION, or HOST_ACTIONproperty - the property name requestedvalue - the property valuejava.lang.Exceptionvoid setProperty(int type,
java.lang.String property,
java.lang.String[] value)
throws java.lang.Exception
Warning: The set value is changed in memory and saved permanently when the action finishes. This means that setProperty() can reliably be used only if - actions are not allowed to run concurrently OR - for a mailbox property there is only one action in the mailbox OR - for a host property there is only one action in the host.
type - either HOST, MAILBOX, ACTION, or HOST_ACTIONproperty - the property name requestedvalue - the property valuesjava.lang.Exceptionjava.lang.String encode(java.lang.String string)
throws java.lang.Exception
string - to encodejava.lang.Exceptionjava.lang.String decode(java.lang.String string)
throws java.lang.Exception
string - to decodejava.lang.Exceptionjava.lang.String encrypt(java.lang.String string)
throws java.lang.Exception
string - to encryptjava.lang.Exceptionjava.lang.String decrypt(java.lang.String string)
throws java.lang.Exception
string - to decryptjava.lang.ExceptionICertManagerRunTime getCertManager() throws java.lang.Exception
java.lang.Exception - if VersaLex object no longer open or if running in CLIENT
mode and remote method invocation errorILicense getLicense() throws java.lang.Exception
java.lang.ExceptionILicenser getLicenser() throws java.lang.Exception
java.lang.Exception - if VersaLex object no longer open or if running in CLIENT
mode and remote method invocation errorISyncer getSyncer() throws java.lang.Exception
java.lang.Exception - if VersaLex object no longer open or if running in CLIENT
mode and remote method invocation errorboolean activeIO(java.lang.String path)
throws java.lang.Exception
path - the file path to be checked for active I/Ojava.lang.Exceptionjava.io.File getAbsolute(java.io.File file)
throws java.lang.Exception
file - either relative or absolute file pathjava.lang.Exceptionjava.lang.String getAbsolute(java.lang.String path)
throws java.lang.Exception
path - either relative or absolute file pathjava.lang.Exceptionjava.io.File getRelative(java.io.File file)
throws java.lang.Exception
file - either relative or absolute file pathjava.lang.Exceptionjava.lang.String getRelative(java.lang.String path)
throws java.lang.Exception
path - either relative or absolute file pathjava.lang.Exceptionjava.lang.String applyDefaultBox(java.lang.String local,
boolean inbox)
throws java.lang.Exception
local - a relative or absolute pathinbox - true if local is inbound path; false if local is outbound pathjava.lang.ExceptionIMailboxController getMailboxController() throws java.lang.Exception
java.lang.ExceptionIMailboxController getMailboxController(java.lang.String[] path) throws java.lang.Exception
path - the alias path to the host and/or mailbox. The host and/or mailbox must be in the same host tree branch (or below) as the standalone action.java.lang.ExceptionIActionController getActionController() throws java.lang.Exception
java.lang.ExceptionIActionController getActionController(java.lang.String[] path) throws java.lang.Exception
path - the alias path to the action. The action must be in the same host tree branch (or below) as the standalone action.java.lang.Exceptionint getHostProtocol()
throws java.lang.Exception
java.lang.Exceptionint getMailboxPackaging()
throws java.lang.Exception
java.lang.Exceptionboolean isLocal()
throws java.lang.Exception
java.lang.ExceptionOptions getOptions() throws java.lang.Exception
java.lang.Exceptionjava.lang.String getVersion()
throws java.lang.Exception
java.lang.Exceptionvoid debug(java.lang.String debugMessage)
throws java.lang.Exception
debugMessage - the message to writejava.lang.Exceptionvoid logDetail(java.lang.String logMessage)
throws java.lang.Exception
logMessage - the message to writejava.lang.Exception - if this method is used in the thread which did not execute the script
an exception will be thrown.void logDetail(java.lang.String logMessage,
int level,
java.lang.String color)
throws java.lang.Exception
logMessage - the message to writelevel - the message log levelcolor - the message color (e.g. black, red, or orange)java.lang.Exception - if this method is used in the thread which did not execute the script
an exception will be thrown.boolean executeActionCommand(java.lang.String command)
throws java.lang.Exception
command - command to executejava.lang.ExceptionTrigger getTrigger() throws java.lang.Exception
java.lang.Exceptionboolean isResending()
throws LexiComException
LexiComException - is thrown if this is not invoked from within an action.LexiComOutgoing[] getResends() throws LexiComException
LexiComException - is thrown if this is not invoked from within an action
or if the action is not a resend run type.LogListeners getLogListeners() throws LexiComException
LexiComExceptionIncomingFilters getIncomingFilters() throws LexiComException
LexiComExceptionjava.lang.Object runScriptAction(java.lang.String alias,
java.lang.String... args)
throws java.lang.Exception
alias - the relative alias of the script action; can be a standalone, host, or mailbox action (if accessible)args - the optional set of arguments to pass to the actionLexiComExceptionjava.lang.Exceptionjava.lang.Object runScriptAction(java.lang.String[] path,
java.lang.String... args)
throws java.lang.Exception
path - the absolute alias path to the script action; can be a standalone, host, or mailbox action (if accessible)args - the optional set of arguments to pass to the actionLexiComExceptionjava.lang.Exceptioncom.cleo.users.ConnectedUsers.UserSession[] getConnectedUsers()
throws java.lang.Exception
java.lang.Exception