Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013

ag.ion.bion.officelayer.application.connection
Class SimpleConnection

java.lang.Object
  extended by ag.ion.bion.officelayer.application.connection.SimpleConnection

public class SimpleConnection
extends java.lang.Object

This class handles connections to remote and local OpenOffice installations


Field Summary
static int TYPE_LOCAL
          Indicates a Local OO Installation.
static int TYPE_REMOTE
          Indicates a remote OO installation.
 
Constructor Summary
SimpleConnection(java.lang.String connectionString, int port)
          New NoaConnection instance, connects to OO using the given parameters.
 
Method Summary
static SimpleConnection getConnection()
          Creates a connection, depending on the current local config.
 IDesktopService getDesktopService()
           
 IDocumentService getDocumentService()
           
 int getType()
          -1 indicates no connection.
static void startOOServerIfNotRunning(java.lang.String path, int port)
          Tries to start OO in headless server mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_LOCAL

public static final int TYPE_LOCAL
Indicates a Local OO Installation.

See Also:
Constant Field Values

TYPE_REMOTE

public static final int TYPE_REMOTE
Indicates a remote OO installation.

See Also:
Constant Field Values
Constructor Detail

SimpleConnection

public SimpleConnection(java.lang.String connectionString,
                        int port)
                 throws java.lang.Exception
New NoaConnection instance, connects to OO using the given parameters.

Parameters:
connectionString - The connection String. Can be a Path or an IP
port - The port to connect to. A port value of zero (0) indicates a local connection
Throws:
java.lang.Exception - If any Exception is thrown during the connection attempt
Method Detail

getConnection

public static SimpleConnection getConnection()
Creates a connection, depending on the current local config.

Returns:

getType

public int getType()
-1 indicates no connection.

Returns:
the type

getDocumentService

public IDocumentService getDocumentService()
Returns:
the documentService

getDesktopService

public IDesktopService getDesktopService()
Returns:
the desktopService

startOOServerIfNotRunning

public static void startOOServerIfNotRunning(java.lang.String path,
                                             int port)
Tries to start OO in headless server mode. Give it at least 3-4 seconds before attempting to use the server.

Parameters:
path - The path where the OO installation resides
port - The port the server shall listen to
Throws:
java.io.IOException

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013