Merged V2.1 to HEAD

6418: Allow getLayeringInfo on deleted nodes.
   6419: fixes for submitting of deleted directories and regenerate renditions related fixes.
   6420: Added installs to build
   6421: Build fix for sdk
   6423: WCM-710 - Submit All feature reintroducted to WCM My Modified Files views
   6424: OpenOffice connection is now tested on bootstrap.
   6425: AWC-1446 - Space Selector would show spaces you do not have access to
   6426: WCM-699 - Staging area user assets
   6427: Rollback exceptions now explicitly handled by RetryingTransactionHelper to extract the cause of the exception.
   6428: Fix for AWC-1340
   6429: Fixed transaction boundaries for full index recovery components
   6433: AR-1660 - SMB and SMB2 signature check 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6732 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-10 21:50:49 +00:00
parent 10b7df662f
commit 4711101687
12 changed files with 138 additions and 27 deletions

View File

@@ -32,15 +32,15 @@ import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.i18n.I18NUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationEvent;
/**
* Simple class that checks for the presence of a valid <b>OpenOffice</b>
* connection, as provided by the
* A bootstrap class that checks for the presence of a valid <b>OpenOffice</b> connection, as provided by the
* <code>net.sf.jooreports.openoffice.connection.OpenOfficeConnection</code> implementations.
*
* @author Derek Hulley
*/
public class OpenOfficeConnectionTester
public class OpenOfficeConnectionTester extends AbstractLifecycleBean
{
private static final String INFO_CONNECTION_VERIFIED = "system.openoffice.info.connection_verified";
private static final String ERR_CONNECTION_FAILED = "system.openoffice.err.connection_failed";
@@ -73,12 +73,29 @@ public class OpenOfficeConnectionTester
this.strict = strict;
}
/**
* @see #checkConnection()
*/
@Override
protected void onBootstrap(ApplicationEvent event)
{
checkConnection();
}
/**
* Does nothing.
*/
@Override
protected void onShutdown(ApplicationEvent event)
{
}
/**
* Perform the actual connection check. If this component is {@link #setStrict(boolean) strict},
* then a disconnected {@link #setConnection(OpenOfficeConnection) connection} will result in a
* runtime exception being generated.
*/
public synchronized void checkConnection()
private synchronized void checkConnection()
{
PropertyCheck.mandatory(this, "connection", connection);
String connectedMessage = I18NUtil.getMessage(INFO_CONNECTION_VERIFIED);