|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRemoteJobTools
Collection of useful methods to schedule jobs to visualize and execute background processes in the Notes UI
Nested Class Summary | |
---|---|
static class |
IRemoteJobTools.ConstantsType
Use this enum to create standard IRemoteQualifiedName s of Eclipse and the Remote API |
Field Summary | |
---|---|
static java.lang.String |
AGENT_PROPERTY_PREFIX
Qualifier to be used to create and set Notes agent job properties (e.g. to pass parameters) |
static java.lang.String |
ECLIPSE_PROPERTY_PREFIX
Qualifier to be used to create and set standard Eclipse job properties |
static java.lang.String |
JS_PROPERTY_PREFIX
Qualifier to be used to create and set JavaScript job properties (e.g. to pass parameters) |
Method Summary | |
---|---|
IRemoteNotesBGAgentJob |
createAgentJob(java.lang.String server,
java.lang.String dbPath,
java.lang.String agentName,
boolean agentReportsProgress)
Creates a IRemoteNotesBGAgentJob to execute a Notes agent as an Eclipse job in
the background. |
IRemoteJavascriptAction |
createJavaScriptInLibAction(java.lang.String server,
java.lang.String dbPath,
java.lang.String ssjsLibName,
java.lang.String methodCallJS,
java.lang.String description)
Creates an action that can be registered as a job action via IRemoteJob.setProperty(IRemoteQualifiedName, Object) . |
IRemoteJavascriptJob |
createJavascriptInLibJob(java.lang.String jobName,
java.lang.String server,
java.lang.String filePath,
java.lang.String ssjsLibName,
java.lang.String methodCallJS)
Creates a new JavaScript background job. |
IRemoteMonitoringJob |
createMonitoringJob(java.lang.String jobName)
Creates a job that can be used to visualize progress and status information (e.g. in a progress dialog). |
IRemoteQualifiedName |
createPropertyKey(java.lang.String qualifier,
java.lang.String localName)
Factory method to create a new IRemoteQualifiedName that can be used to pass
values to a background job. |
IRemoteRunUIAgentAction |
createRunUIAgentAction(java.lang.String server,
java.lang.String dbPath,
java.lang.String agentName,
java.lang.String description)
Creates an action that can be registered as a job action via IRemoteJob.setProperty(IRemoteQualifiedName, Object) . |
IRemoteQualifiedName |
getProgressConstants(IRemoteJobTools.ConstantsType type)
Method to create standard IRemoteQualifiedName s of Eclipse and the Remote API |
void |
runUIAgent(java.lang.String server,
java.lang.String dbPath,
java.lang.String agentName,
boolean runOnUIContext,
java.util.Map<java.lang.String,java.lang.Object> params)
Runs a Notes agent in the Notes UI thread (meaning that e.g. |
Field Detail |
---|
static final java.lang.String ECLIPSE_PROPERTY_PREFIX
static final java.lang.String AGENT_PROPERTY_PREFIX
static final java.lang.String JS_PROPERTY_PREFIX
Method Detail |
---|
IRemoteQualifiedName getProgressConstants(IRemoteJobTools.ConstantsType type) throws RemoteEclipseAPIException
IRemoteQualifiedName
s of Eclipse and the Remote API
type
- qualified name type
RemoteEclipseAPIException
IRemoteNotesBGAgentJob createAgentJob(java.lang.String server, java.lang.String dbPath, java.lang.String agentName, boolean agentReportsProgress) throws RemoteEclipseAPIException
IRemoteNotesBGAgentJob
to execute a Notes agent as an Eclipse job in
the background. The agent code cannot directly access NotesUIWorkspace, because it is
running in the background and not in the classic Notes Client's UI thread (like UI LotusScript code).
Use it to process a long running operation in a LotusScript agent with the capability of reporting
progress and check for user cancellation. To report the agent's result, you can for example register
a IRemoteRunUIAgentAction
to be called when the background job is done.
, then display the result in the UI
thread, the result by using
IRemoteNotesUIWorkspace.runAgent(String, String, String, Map, boolean, boolean)
server
- agent database's serverdbPath
- agent database's filepathagentName
- agent nameagentReportsProgress
- true
if the agent is Remote API enabled, e.g. the API methods are used to report progress; false/ to display an indetermined job progress instead
- Returns:
- job
- Throws:
RemoteEclipseAPIException
void runUIAgent(java.lang.String server, java.lang.String dbPath, java.lang.String agentName, boolean runOnUIContext, java.util.Map<java.lang.String,java.lang.Object> params) throws RemoteEclipseAPIException
param
map,
will be added to the temporary document. Also note with this method you can run an agent from one
database on a completely different database. In other words, the agent you are running does not
have to run on documents from the same database. While this gives the user more flexibility it also
may break some assumptions of the agent, for example what fields are on the document.
server
- agent's database serverdbPath
- agent's database filepathagentName
- agent namerunOnUIContext
- true to run the agent on the current UI context false to run the agent on the temporary document (containing the passed parameters)params
-
RemoteEclipseAPIException
IRemoteQualifiedName createPropertyKey(java.lang.String qualifier, java.lang.String localName) throws RemoteEclipseAPIException
IRemoteQualifiedName
that can be used to pass
values to a background job.IRemoteQualifiedName
wraps an Eclipse org.eclipse.core.runtime.QualifiedName
qualifier
- qualifierlocalName
- property local name
RemoteEclipseAPIException
IRemoteRunUIAgentAction createRunUIAgentAction(java.lang.String server, java.lang.String dbPath, java.lang.String agentName, java.lang.String description) throws RemoteEclipseAPIException
IRemoteJob.setProperty(IRemoteQualifiedName, Object)
.
You can either register such an action for the execution phase of a job (in this case, the
user can click on a link in the progress perspective of the Notes Client) or the action may be executed
automatically when the agent is done.createPropertyKey(String, String)
with type IRemoteJobTools.ConstantsType.ECLIPSE_ACTION_PROPERTY
to
create a IRemoteQualifiedName
, then use this qualified name to call IRemoteJob.setProperty(IRemoteQualifiedName, Object)
and pass the action as property value.createPropertyKey(String, String)
with type IRemoteJobTools.ConstantsType.JOBDONE_ACTION_PROPERTY
to
create a IRemoteQualifiedName
, then use this qualified name to call IRemoteJob.setProperty(IRemoteQualifiedName, Object)
and pass the action as property value.
server
- agent database's serverdbPath
- agent database's filepathagentName
- agent namedescription
- text for job status link in progress perspective, null
to use the default ("OK")
RemoteEclipseAPIException
IRemoteJavascriptAction createJavaScriptInLibAction(java.lang.String server, java.lang.String dbPath, java.lang.String ssjsLibName, java.lang.String methodCallJS, java.lang.String description) throws RemoteEclipseAPIException
IRemoteJob.setProperty(IRemoteQualifiedName, Object)
.
You can either register such an action for the execution phase of a job (in this case, the
user can click on a link in the progress perspective of the Notes Client) or the action may be executed
automatically when the agent is done.createPropertyKey(String, String)
with type IRemoteJobTools.ConstantsType.ECLIPSE_ACTION_PROPERTY
to
create a IRemoteQualifiedName
, then use this qualified name to call IRemoteJob.setProperty(IRemoteQualifiedName, Object)
and pass the action as property value.createPropertyKey(String, String)
with type IRemoteJobTools.ConstantsType.JOBDONE_ACTION_PROPERTY
to
create a IRemoteQualifiedName
, then use this qualified name to call IRemoteJob.setProperty(IRemoteQualifiedName, Object)
and pass the action as property value.session - use this to read/write data in Lotus Notes Java APIs
database - database in which the SSJS is located
progress - wraps a org.eclipse.core.runtime.IProgressMonitor
to report progress and check for cancellation
context - a temporary document that is shared between the running Job and the action. Use it to transfer computation results or the current progress
server
- SSJS lib db serverdbPath
- SSJS lib db filepathssjsLibName
- SSJS lib namemethodCallJS
- JavaScript method call, e.g. "method();" - the line is appended to the SSJS lib codedescription
- text for job status link in progress perspective, null
to use the default ("OK")
RemoteEclipseAPIException
IRemoteMonitoringJob createMonitoringJob(java.lang.String jobName) throws RemoteEclipseAPIException
IRemoteProgressMonitor.done()
is called on the
progress monitor returned by IRemoteMonitoringJob.getProgressMonitor()
jobName
- job name
RemoteEclipseAPIException
IRemoteJavascriptJob createJavascriptInLibJob(java.lang.String jobName, java.lang.String server, java.lang.String filePath, java.lang.String ssjsLibName, java.lang.String methodCallJS) throws RemoteEclipseAPIException
session - use this to read/write data in Lotus Notes Java APIs
database - database in which the SSJS is located
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 IRemoteJavascriptJob.addJSProperty(String, Object)
. If you register a 'Run UI action' (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 IRemoteJavascriptJob.addJSProperty(String, Object)
}
jobName
- job nameserver
- SSJS lib db serverfilePath
- SSJS lib db filepathssjsLibName
- SSJS lib namemethodCallJS
- JavaScript method call, e.g. "method();" - the line is appended to the SSJS lib code
RemoteEclipseAPIException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |