org.alfresco.util
Class OpenOfficeConnectionTester
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.util.OpenOfficeConnectionTester
- All Implemented Interfaces:
- java.util.EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
public class OpenOfficeConnectionTester
- extends org.springframework.extensions.surf.util.AbstractLifecycleBean
A bootstrap class that checks for the presence of a valid OpenOffice connection, as provided by the
net.sf.jooreports.openoffice.connection.OpenOfficeConnection
implementations.
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean |
log |
Method Summary |
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event)
|
protected void |
onShutdown(org.springframework.context.ApplicationEvent event)
Disconnect |
void |
setConnection(net.sf.jooreports.openoffice.connection.OpenOfficeConnection connection)
|
void |
setStrict(boolean strict)
|
boolean |
testAndConnect()
|
Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean |
getApplicationContext, onApplicationEvent, setApplicationContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OpenOfficeConnectionTester
public OpenOfficeConnectionTester()
setConnection
public void setConnection(net.sf.jooreports.openoffice.connection.OpenOfficeConnection connection)
- Parameters:
connection
- the OpenOffice connection.
setStrict
public void setStrict(boolean strict)
- Parameters:
strict
- set to true to generate a failure if the connection is not connected
during the connection check
, or false to just issue
a warning. The default is false.
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
- Specified by:
onBootstrap
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
- See Also:
OpenOfficeConnectionTester.checkConnection()
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
- Disconnect
- Specified by:
onShutdown
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
testAndConnect
public boolean testAndConnect()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.