com.mindoo.remote.api.com.ibm.notes.java.ui
Interface IRemoteNotesUIWorkspace


public interface IRemoteNotesUIWorkspace

Remote API Wrapper for the com.ibm.notes.java.ui.NotesUIWorkspace (Online documentation)

Original documentation:
The super class for all data needed for performing operations on Notes objects, such as databases, view, documents, and others.


Method Summary
 void composeDocument(Database db, Document templateDoc)
          Create a new document in the UI from the given template document fields.
 void composeDocument(java.lang.String server, java.lang.String filePath, java.lang.String templateDocUrl)
          Create a new document in the UI from the given template document fields.
 IRemoteNotesUIDocument getCurrentDocument()
          Returns a IRemoteNotesUIDocument object representing the document that's currently open.
 IRemoteNotesUIView getCurrentView()
          Return the currently selected view.
 Document getTemporaryDocument(Session session)
          Returns a new, empty document in a local, temporary database.
 IRemoteNotesUIDocument getUIDocument(IRemoteWorkbenchPart part)
          Tries to create a IRemoteNotesUIDocument from the given IRemoteWorkbenchPart.
 IRemoteNotesUIView getUIView(IRemoteWorkbenchPart part)
          Tries to create a IRemoteNotesUIView from the give IRemoteWorkbenchPart.
 void openUrl(java.lang.String url)
          Opens the specified Notes URL.
 java.lang.Object prompt(int type, java.lang.String title, java.lang.String prompt, java.lang.Object defValue, java.lang.String[] values)
          Displays a dialog box and returns a value based on the user's actions in the dialog box.
 void runAgent(java.lang.String server, java.lang.String dbPath, java.lang.String agentName, java.util.Map<java.lang.String,java.lang.Object> agentParams, boolean runOnUIContext, boolean waitUntilFinished)
          Runs the agent represented by the server/dbpath/agentName.
 

Method Detail

openUrl

void openUrl(java.lang.String url)
             throws RemoteEclipseAPIException
Opens the specified Notes URL.

Parameters:
url - URL of object to open
Throws:
RemoteEclipseAPIException

composeDocument

void composeDocument(java.lang.String server,
                     java.lang.String filePath,
                     java.lang.String templateDocUrl)
                     throws RemoteEclipseAPIException
Create a new document in the UI from the given template document fields.

Parameters:
server - db server for new document
filePath - db filepath for new document
templateDocUrl - Notes URL of existing template document with preset fields
Throws:
RemoteEclipseAPIException

composeDocument

void composeDocument(Database db,
                     Document templateDoc)
                     throws RemoteEclipseAPIException
Create a new document in the UI from the given template document fields.

Parameters:
db - db for new document
templateDoc - document with preset fields
Throws:
RemoteEclipseAPIException

getTemporaryDocument

Document getTemporaryDocument(Session session)
                              throws RemoteEclipseAPIException
Returns a new, empty document in a local, temporary database.

Parameters:
session - the current session
Returns:
document in a temporary database
Throws:
RemoteEclipseAPIException

getCurrentDocument

IRemoteNotesUIDocument getCurrentDocument()
                                          throws RemoteEclipseAPIException
Returns a IRemoteNotesUIDocument object representing the document that's currently open. If there is no document currently open on the workspace, this method returns nothing. This is applicable when there is an open document, not in a view. Must be called from the UI thread.

Returns:
the current document
Throws:
RemoteEclipseAPIException

getCurrentView

IRemoteNotesUIView getCurrentView()
                                  throws RemoteEclipseAPIException
Return the currently selected view. Must be called from the UI thread.

Returns:
the current view
Throws:
RemoteEclipseAPIException

prompt

java.lang.Object prompt(int type,
                        java.lang.String title,
                        java.lang.String prompt,
                        java.lang.Object defValue,
                        java.lang.String[] values)
                        throws RemoteEclipseAPIException
Displays a dialog box and returns a value based on the user's actions in the dialog box.

Parameters:
type - indicates the type of dialog box that you want to display, values from the Prompt class specifies type
title - the text that you want displayed in the dialog box title bar
prompt - the text that you want displayed within the dialog box
defValue - the value that will be used as your default input value
values - the values that you want displayed in the dialog box's list box, where applicable
Returns:
value selected by the user
Throws:
RemoteEclipseAPIException

getUIDocument

IRemoteNotesUIDocument getUIDocument(IRemoteWorkbenchPart part)
                                     throws RemoteEclipseAPIException
Tries to create a IRemoteNotesUIDocument from the given IRemoteWorkbenchPart.

Parameters:
part - the IRemoteWorkbenchPart to create the NotesUIDocument from
Returns:
a IRemoteNotesUIDocument is possible, else this method will return null
Throws:
RemoteEclipseAPIException

getUIView

IRemoteNotesUIView getUIView(IRemoteWorkbenchPart part)
                             throws RemoteEclipseAPIException
Tries to create a IRemoteNotesUIView from the give IRemoteWorkbenchPart.

Parameters:
part - the IRemoteWorkbenchPart to create the IRemoteNotesUIView from
Returns:
a IRemoteNotesUIView if possible, else this method will return null
Throws:
RemoteEclipseAPIException

runAgent

void runAgent(java.lang.String server,
              java.lang.String dbPath,
              java.lang.String agentName,
              java.util.Map<java.lang.String,java.lang.Object> agentParams,
              boolean runOnUIContext,
              boolean waitUntilFinished)
              throws RemoteEclipseAPIException
Runs the agent represented by the server/dbpath/agentName. Pass in false for runOnUIContext to run your agent on a temporary document. Pass in true for runOnUIContext to run your agent on the current selected document in the UI. Values added via the agentParams 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.

When running an agent on a temporary document it is recommended that you set the Target the in the properties dialog of the agent to be 'None'. You can do this while editing the agent in Domino Designer. This allows you to run the agent without having anything selected in the UI. To access the temporary document from your agent, you can use Session.DocumentContext in LotusScript, or Session.getAgentContext().getDocumentContext() in Java. The note id of the temporary document is returned to you in the NotesDocumentDataCallback object.

Formula agents must be run on the UI context. When running a formula agent you must pass true to this method for runOnUIContext. As a result of this limitation, formula agents cannot be run on temporary documents.

There is a limit on how large the fields that are added to the temporary document can be. If a value is added via agentParams, and it is greater than 30,000 characters in length, you may see unexpected results when running the agent.

Parameters:
server - server of agent's database
dbPath - filepath of agent's database
agentName - name of agent
agentParams - map with parameters (Strings and numbers values)
runOnUIContext - true to run the agent on the current UI context false to run the agent on the temporary document
waitUntilFinished - flag to block code execution until the agent is done
Throws:
RemoteEclipseAPIException