Merged V3.4-BUG-FIX to HEAD

28158: ALF-8925: Merged V3.3 to V3.4-BUG-FIX
      28121: ALF-8878: Prevent authentication errors in SMBSrvSession.cleanupSession()
   28159: Merged HEAD to V3.4-BUG-FIX (RECORD ONLY)
      27951: Fixed merge issue in ContentDiskDriverTest
   28161: ALF-8861: Fix from Bitrock to kill OpenOffice process on uninstallation if all else fails
   28165: ALF-8260: Corrected French translations of 'Library'
   28166: Fix for ALF-8751 - Dates are not localized in Document Lists dashlet
   28167: Fix for ALF-8493
   28169: ALF-5797: Translation corrections to complex strings
   28171: Merged DEV TO V3.4-BUG-FIX 
      ALF-8808 : CLONE - NFS: User with editor role cannot edit content - unit test required
   28181: Fixed ALF-280: Unfriendly message appears when trying to specify non-existent file-store
   28184: Merged BRANCHES/DEV/BELARUS/V3.4-BUG-FIX-2011_04_12 to BRANCHES/DEV/V3.4-BUG-FIX:
      28179: ALF-8754: Cannot preview content on other webapp folder than ROOT (merged w/ trivial clean-up)
   28185: Fixed ALF-8020: Multivalue date in document details causes error in alfresco share   
      NOTE: We do not support any multi-valued fields other than text currently, this fix is therefore to handle the case where a multivalued date or dateTime field is configured in a form. The form will list the dates in view mode but in create and edit modes the control is not displayed at all when there are multiple values, if there is only one value the control continues to function as it has done previously.
   28188: Fix for ALF-731 - in a cluster environment (high availibility), when a node goes down, the users are asked to login


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28208 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2011-06-06 10:57:20 +00:00
parent 02e3d817de
commit a8f0689c1c
5 changed files with 379 additions and 149 deletions

View File

@@ -305,7 +305,7 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
inviteWebUser(wpNodeRef, AuthenticationUtil.getFullyAuthenticatedUser(), WCMUtil.ROLE_CONTENT_MANAGER, true);
// Bind the post-commit transaction listener with data required for virtualization server notification
CreateWebProjectTransactionListener tl = new CreateWebProjectTransactionListener(wpStoreId);
CreateWebAppTransactionListener tl = new CreateWebAppTransactionListener(wpStoreId, WCMUtil.DIR_ROOT);
AlfrescoTransactionSupport.bindListener(tl);
if (logger.isDebugEnabled())
@@ -357,7 +357,7 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
new PropertyValue(DataTypeDefinition.TEXT,
webAppDescription));
}
// Snapshot the store with the empty webapp
avmService.createSnapshot(stagingStoreId, null, null);
@@ -365,6 +365,9 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
}
}, AuthenticationUtil.getSystemUserName());
CreateWebAppTransactionListener tl = new CreateWebAppTransactionListener(wpInfo.getStoreId(), webAppName);
AlfrescoTransactionSupport.bindListener(tl);
if (logger.isDebugEnabled())
{
logger.debug("Created web app: "+webAppName+" in "+(System.currentTimeMillis()-start)+" ms (store id: "+wpInfo.getStoreId()+")");
@@ -1541,15 +1544,17 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
/**
* Transaction listener - invoked after commit
* Create WebProject/WebApp Transaction listener - invoked after commit
*/
private class CreateWebProjectTransactionListener extends TransactionListenerAdapter
private class CreateWebAppTransactionListener extends TransactionListenerAdapter
{
private String wpStoreId;
private String webApp;
public CreateWebProjectTransactionListener(String wpStoreId)
public CreateWebAppTransactionListener(String wpStoreId, String webApp)
{
this.wpStoreId = wpStoreId;
this.webApp = webApp;
}
/**
@@ -1561,11 +1566,11 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
// post-commit
if (wpStoreId != null)
{
// update the virtualisation server with the default ROOT webapp path
// update the virtualisation server with webapp
// performed after the main txn has committed successfully
String newStoreName = WCMUtil.buildStagingStoreName(wpStoreId);
String path = WCMUtil.buildStoreWebappPath(newStoreName, WCMUtil.DIR_ROOT);
String path = WCMUtil.buildStoreWebappPath(newStoreName, webApp);
WCMUtil.updateVServerWebapp(virtServerRegistry, path, true);
}