Merged V2.9 to HEAD

10561: Merged V2.2 to V2.9
      9882: Node DAO separation
   10580: Merged V2.2 to V2.9
      10576: Missing onContentDelete firing
      10577: More policies: beforeCreateNode and beforeDeleteNode when archiving nodes in hierarchy
         - Updated UsageService and TenantService to conform to the new node DAO (more separation)
         - TODO: Tenant node interceptor not present.  This must be added if Multi-Tentant features are required.
   - NodeMonitor event processing now checks that the nodes are still valid before processing.
   - onMove firing was breaking NodeMonitor.  Changed onMove to not fire when nodes are moved between stores.
   - Raised ALFCOM-1912: ClassCastException when accessing property of type ver2:versionNumber
   - Pull setFixedAcls fully into Node DAO for simpler and speedier execution


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10709 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-09-04 00:11:13 +00:00
parent 0876d67c4d
commit 3227355279
58 changed files with 4610 additions and 3230 deletions

View File

@@ -349,19 +349,19 @@ public class NodeMonitor extends TransactionListenerAdapter
// Check if the node is a file/folder, and for our store
NodeRef nodeRef = oldChildAssocRef.getChildRef();
if ( nodeRef.getStoreRef().equals( m_storeRef) == false)
NodeRef oldNodeRef = oldChildAssocRef.getChildRef();
if ( oldNodeRef.getStoreRef().equals( m_storeRef) == false)
return;
QName nodeType = m_nodeService.getType( nodeRef);
QName nodeType = m_nodeService.getType( oldNodeRef);
FileFolderServiceType fType = m_fileFolderService.getType( nodeType);
if ( fType != FileFolderServiceType.INVALID) {
// Get the full path to the file/folder node
Path nodePath = m_nodeService.getPath( nodeRef);
String fName = (String) m_nodeService.getProperty( nodeRef, ContentModel.PROP_NAME);
Path nodePath = m_nodeService.getPath( oldNodeRef);
String fName = (String) m_nodeService.getProperty( oldNodeRef, ContentModel.PROP_NAME);
// Build the share relative path to the node
@@ -376,7 +376,7 @@ public class NodeMonitor extends TransactionListenerAdapter
// DEBUG
if ( logger.isDebugEnabled())
logger.debug("OnMoveNode: nodeRef=" + nodeRef + ", relPath=" + relPath);
logger.debug("OnMoveNode: nodeRef=" + oldNodeRef + ", relPath=" + relPath);
// Queue an event to process the node move
@@ -384,7 +384,7 @@ public class NodeMonitor extends TransactionListenerAdapter
// Create a move event
NodeEvent nodeEvent = new MoveNodeEvent( fType, nodeRef, relPath, newChildAssocRef.getChildRef());
NodeEvent nodeEvent = new MoveNodeEvent( fType, oldNodeRef, relPath, newChildAssocRef.getChildRef());
// Store the event in the transaction until committed, and register the transaction listener
@@ -550,7 +550,15 @@ public class NodeMonitor extends TransactionListenerAdapter
{
return null;
}
else if ( nodeEvent instanceof CreateNodeEvent) {
// Check that the node is still valid
if (!m_nodeService.exists(nodeEvent.getNodeRef()))
{
return null;
}
if ( nodeEvent instanceof CreateNodeEvent) {
// Node created