com.mindoo.remote.api.symphony.document
Interface IRemoteDocuments


public interface IRemoteDocuments

This class represents a collection of all the opened documents.

Documents provides access to documents, and it provides methods to create new documents, open existing documents, save and close all opened documents.

A document can be created and opened in two ways: visible mode and invisible mode, see the addDocument method and openDocument method.


Method Summary
 IRemoteDocument addDocument(java.lang.String template, boolean asTemplate, boolean visible)
          This method creates a new document.
 void closeDocuments(boolean saveChanges)
          This method closes all the documents opened in Lotus Symphony.
 IRemoteSymphonyApplication getApplication()
          This property represents the Lotus Symphony application.
 int getCount()
          This property represents the number of documents opened in Lotus Symphony.
 IRemoteDocument item(int index)
          This method returns a document opened in Lotus Symphony by index.
 IRemoteDocument openDocument(java.lang.String fileName, boolean visible)
          This method opens a document.
 IRemoteDocument openDocument(java.lang.String fileName, boolean visible, java.lang.String password)
          This method opens a document.
 void saveDocuments()
          This method saves all the documents opened in Lotus Symphony.
 

Method Detail

getApplication

IRemoteSymphonyApplication getApplication()
                                          throws RemoteEclipseAPIException
This property represents the Lotus Symphony application.

Returns:
application
Throws:
RemoteEclipseAPIException

getCount

int getCount()
             throws RemoteEclipseAPIException
This property represents the number of documents opened in Lotus Symphony.

Returns:
count
Throws:
RemoteEclipseAPIException

addDocument

IRemoteDocument addDocument(java.lang.String template,
                            boolean asTemplate,
                            boolean visible)
                            throws RemoteEclipseAPIException
This method creates a new document. The values of Name, FullName, Path property of a new document are empty string.

Parameters:
template - Specifies the name of the template to be used for the new document. For example, on Microsoft® Windows® , the format is D:\\template.ott. On Linux®, the format is /home/me/template.ott. If the template file does not exists, this method throws an exception. If no template is used, the value of this property is empty string, for example, documents.addDocument("",false,true).
asTemplate - If a template is used, this parameter specifies true to create a new untitled document based on the template, and it specifies false to load the template for editing. If no template is used, both true and false create a new untitled document.
visible - Specifiestrue to open the new document in a visible window or tab, or false to open the new document in invisible mode.
Returns:
A Document object that represents the new document.
Throws:
RemoteEclipseAPIException

closeDocuments

void closeDocuments(boolean saveChanges)
                    throws RemoteEclipseAPIException
This method closes all the documents opened in Lotus Symphony.

Parameters:
saveChanges - Specifies whether save changes before closing documents. A value of true saves changes. A value of false does not save changes.
Throws:
RemoteEclipseAPIException

item

IRemoteDocument item(int index)
                     throws RemoteEclipseAPIException
This method returns a document opened in Lotus Symphony by index.

Parameters:
index - Specifies the index of the document to be returned, starting at 1.
Returns:
A Document object that represents a document.
Throws:
RemoteEclipseAPIException

openDocument

IRemoteDocument openDocument(java.lang.String fileName,
                             boolean visible)
                             throws RemoteEclipseAPIException
This method opens a document.

This method can open .odt, .ott, .doc, .rtf, and .txt files.

Parameters:
fileName - Specifies the name of the document to be opened. For example, on Microsoft® Windows®, the format is D:\\test.odt. On Linux®, the format is /home/me/test.odt. If the document does not exist or is an unsupported file type, this method throws an exception.
visible - Specifies true to open the document in a visible window or tab, or false to open the document in invisible mode.
Returns:
A Document object that represents the opened document.
Throws:
RemoteEclipseAPIException

saveDocuments

void saveDocuments()
                   throws RemoteEclipseAPIException
This method saves all the documents opened in Lotus Symphony.

Throws:
RemoteEclipseAPIException

openDocument

IRemoteDocument openDocument(java.lang.String fileName,
                             boolean visible,
                             java.lang.String password)
                             throws RemoteEclipseAPIException
This method opens a document.

This method can open .odt, .ott, .doc, .rtf, and .txt files.

Parameters:
fileName - Specifies the name of the document to be opened. For example, on Microsoft® Windows®, the format is D:\\test.odt. On Linux®, the format is /home/me/test.odt. If the document does not exist or is an unsupported file type, this method throws an exception.
visible - Specifies true to open the document in a visible window or tab, or false to open the document in invisible mode.
password - Specifies the password of the document. If the password is not correct, this method throws an exception.
Returns:
A Document object that represents the opened document.
Throws:
RemoteEclipseAPIException