Merged V2.2 to HEAD

11106: Leniency in AVM CAL upgrade to avoid customer upgrade issues ACT-4500
   11129: ETWOTWO-460 Service Port for alfresco runtime
   11144: Proper clean-up of deleted node's properties and aspects
   11146: Modifications to enable 'alternatives' when running patches
   11153: Fixed masked NPE when checking 'alternative' patches
   11154: Some neat reporting when a patch doesn't execute as a result of an alternative patch having run
   11161: ETWOTWO-91
   11163: ETWOTWO-733: CheckOutCheckInService.getWorkingCopy(NodeRef) returns nodes ...
   11165: Merged V2.1 to V2.2
      10983: Close stream for audit config
   11192: ETWOTWO-169 -  Editing FSR Deployment Receiver causes password to be lost
   11210: Merge of refactored AVM Filesystem storeCreated Processing from 2.1


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11227 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-10-07 02:01:55 +00:00
parent e6d7627f13
commit 1cd93731fd
16 changed files with 636 additions and 76 deletions

View File

@@ -31,6 +31,7 @@ import org.alfresco.jlan.server.filesys.DiskInterface;
import org.alfresco.jlan.server.filesys.FileName;
import org.alfresco.jlan.server.filesys.FileSystem;
import org.alfresco.jlan.server.filesys.NotifyChange;
import org.alfresco.jlan.util.StringList;
import org.alfresco.repo.avm.CreateStoreCallback;
import org.alfresco.repo.avm.CreateVersionCallback;
import org.alfresco.repo.avm.PurgeStoreCallback;
@@ -86,6 +87,11 @@ public class AVMContext extends AlfrescoContext
private int m_showOptions;
// List of newly created store names that need adding into the virtualization view
private StringList m_newStores;
private Object m_newStoresLock;
/**
* Class constructor
*
@@ -127,6 +133,9 @@ public class AVMContext extends AlfrescoContext
m_virtualView = true;
m_showOptions = showOptions;
m_newStoresLock = new Object();
m_newStores = new StringList();
// Save the associated filesystem driver
@@ -172,6 +181,34 @@ public class AVMContext extends AlfrescoContext
{
return m_virtualView;
}
/**
* Check if there are any new stores queued for adding to the virtualization view
*
* @return boolean
*/
protected final boolean hasNewStoresQueued() {
if ( m_newStores == null || m_newStores.numberOfStrings() == 0)
return false;
return true;
}
/**
* Return the new stores queue, and reset the current queue
*
* @return StringList
*/
protected StringList getNewStoresQueue() {
StringList storesQueue = null;
synchronized ( m_newStoresLock) {
storesQueue = m_newStores;
m_newStores = new StringList();
}
return storesQueue;
}
/**
* Check if normal stores should be shown in the virtualization view
@@ -285,6 +322,11 @@ public class AVMContext extends AlfrescoContext
*/
public void storeCreated(String storeName)
{
// Not interested if the virtualization view is not enabled
if ( isVirtualizationView() == false)
return;
// Make sure the file state cache is enabled
FileStateTable fsTable = getStateTable();
@@ -297,10 +339,20 @@ public class AVMContext extends AlfrescoContext
if ( rootState != null)
{
// Delete the root folder file state and recreate it
// DEBUG
fsTable.removeFileState( FileName.DOS_SEPERATOR_STR);
// m_avmDriver.findPseudoState( new AVMPath( ""), this);
if ( logger.isDebugEnabled())
logger.debug("Queueing new store " + storeName + " for addition to virtualization view");
// Add the new store name to the list to be picked up by the next file server access
// to the filesystem
synchronized ( m_newStoresLock) {
// Add the new store name
m_newStores.addString( storeName);
}
}
}
@@ -311,6 +363,11 @@ public class AVMContext extends AlfrescoContext
*/
public void storePurged(String storeName)
{
// Not interested if the virtualization view is not enabled
if ( isVirtualizationView() == false)
return;
// Make sure the file state cache is enabled
FileStateTable fsTable = getStateTable();
@@ -367,6 +424,11 @@ public class AVMContext extends AlfrescoContext
*/
public void versionCreated(String storeName, int versionID)
{
// Not interested if the virtualization view is not enabled
if ( isVirtualizationView() == false)
return;
// Make sure the file state cache is enabled
FileStateTable fsTable = getStateTable();
@@ -432,6 +494,11 @@ public class AVMContext extends AlfrescoContext
*/
public void versionPurged(String storeName, int versionID)
{
// Not interested if the virtualization view is not enabled
if ( isVirtualizationView() == false)
return;
// Make sure the file state cache is enabled
FileStateTable fsTable = getStateTable();