com.mindoo.remote.api.jobs
Interface IRemoteJavascriptJob
- All Superinterfaces:
- IRemoteJob
public interface IRemoteJavascriptJob
- extends IRemoteJob
Interface for a job that is executing JavaScript code in the background.
Please note that you cannot use @formula language or
other classes from an XPages application. We simply used JavaScript as an easy interpreted
language to schedule background jobs without the need to create and install an explicit plugin
in the Notes client. However, there are a few JavaScript variables that are automatically registered
for your convenience:
session - use this to read/write data in Lotus Notes Java APIs
progress - wraps a org.eclipse.core.runtime.IProgressMonitor
to report progress and check for cancellation
context - a temporary document that contains string/double/integer parameter values passed via addJSProperty(String, Object)
. If you register a 'Run UI action' (IRemoteJobTools.createRunUIAgentAction(String, String, String, String)
) for the job, this context document is also passed to this action.
Additional JavaScript variables can be defined by using addJSProperty(String, Object)
}
Method Summary |
void |
addJSProperty(java.lang.String jsVarName,
java.lang.Object value)
Helper method to pass values to the JavaScript engine that a declared as global variables
for the JavaScript execution |
addJSProperty
void addJSProperty(java.lang.String jsVarName,
java.lang.Object value)
throws RemoteEclipseAPIException
- Helper method to pass values to the JavaScript engine that a declared as global variables
for the JavaScript execution
- Parameters:
jsVarName
- variable namevalue
- any Java object; string/double/integer values will automatically be written into a temporary document accessible as "context" variable
- Throws:
RemoteEclipseAPIException