Index: kernel/classes/eztrigger.php
===================================================================
--- kernel/classes/eztrigger.php	(revision 21470)
+++ kernel/classes/eztrigger.php	(working copy)
@@ -2,7 +2,7 @@
 //
 // Definition of eZTrigger class
 //
-// Created on: <11-���-2002 13:11:15 sp>
+// Created on: <11-ÁÕÝ-2002 13:11:15 sp>
 //
 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
 // SOFTWARE NAME: eZ Publish
@@ -383,6 +383,23 @@
         $workFlowID = (int)$workFlowID;
         $db->query( "DELETE FROM eztrigger WHERE workflow_id=$workFlowID" );
     }
+    /*!
+     Checks if a trigger is defined in [OperationSettings].AvailableOperations
+    */
+    static function useTrigger( $name = false )
+    {
+    	if ( $name === false )
+    	   return false;
+    	// Check if read operations should be used
+        $workflowINI = eZINI::instance( 'workflow.ini' );
+        $operationList = $workflowINI->variableArray( 'OperationSettings', 'AvailableOperations' );
+        $operationList = array_unique( array_merge( $operationList, $workflowINI->variable( 'OperationSettings', 'AvailableOperationList' ) ) );
+        if ( in_array( $name, $operationList ) )
+            return true;
+        else
+            return false;	
+    }
+    
 }
 
 ?>
Index: kernel/content/action.php
===================================================================
--- kernel/content/action.php	(revision 21470)
+++ kernel/content/action.php	(working copy)
@@ -281,15 +281,19 @@
         return $module->redirectToView( 'view', array( 'full', $node->attribute( 'node_id' ) ) );
     }
 
-    //include_once( 'kernel/classes/ezcontentobjecttreenodeoperations.php' );
-    if( !eZContentObjectTreeNodeOperations::move( $nodeID, $selectedNodeID ) )
-    {
-        eZDebug::writeError( "Failed to move node $nodeID as child of parent node $selectedNodeID",
-                             'content/action' );
-    }
+	if ( eZTrigger::useTrigger( 'content_move' ) )
+	{
+	    $operationResult = eZOperationHandler::execute( 'content',
+	                                                    'move', array( 'node_id' => $nodeID,
+	                                                                   'object_id' => $objectID,
+	                                                                   'new_parent_node_id' => $selectedNodeID ),
+	                                                     null, true );
+	}
+	else
+	{
+	    eZContentOperationCollection::moveNode( $nodeID, $objectID, $selectedNodeID );
+	}
 
-    eZContentObject::fixReverseRelations( $objectID, 'move' );
-
     return $module->redirectToView( 'view', array( $viewMode, $nodeID, $languageCode ) );
 }
 else if ( $module->isCurrentAction( 'MoveNodeRequest' ) )
@@ -453,62 +457,20 @@
     }
 
     // exchange contentobject ids and versions.
-    $node->setAttribute( 'contentobject_id', $selectedObjectID );
-    $node->setAttribute( 'contentobject_version', $selectedObjectVersion );
-
-    $db = eZDB::instance();
-    $db->begin();
-    $node->store();
-    $selectedNode->setAttribute( 'contentobject_id', $objectID );
-    $selectedNode->setAttribute( 'contentobject_version', $objectVersion );
-    $selectedNode->store();
-
-    // clear user policy cache if this was a user object
-    if ( $object->attribute( 'contentclass_id' ) == $userClassID )
+    if ( eZTrigger::useTrigger( 'content_swap' ) )
     {
-        eZUser::cleanupCache();
+        $operationResult = eZOperationHandler::execute( 'content',
+                                                        'swap',
+                                                         array( 'node_id' => $nodeID,
+                                                                'selected_node_id' => $selectedNodeID,
+                                                                'node_list' => array( $nodeID, $selectedNodeID ) ),
+                                                         null, true );
     }
-
-    // modify path string
-    $changedOriginalNode = eZContentObjectTreeNode::fetch( $nodeID );
-    $changedOriginalNode->updateSubTreePath();
-    $changedTargetNode = eZContentObjectTreeNode::fetch( $selectedNodeID );
-    $changedTargetNode->updateSubTreePath();
-
-    // modify section
-    if ( $changedOriginalNode->attribute( 'main_node_id' ) == $changedOriginalNode->attribute( 'node_id' ) )
+    else
     {
-        $changedOriginalObject = $changedOriginalNode->object();
-        $parentObject = $nodeParent->object();
-        if ( $changedOriginalObject->attribute( 'section_id' ) != $parentObject->attribute( 'section_id' ) )
-        {
-
-            eZContentObjectTreeNode::assignSectionToSubTree( $changedOriginalNode->attribute( 'main_node_id' ),
-                                                             $parentObject->attribute( 'section_id' ),
-                                                             $changedOriginalObject->attribute( 'section_id' ) );
-        }
+        eZContentOperationCollection::swapNode( $nodeID, $selectedNodeID, array() );
     }
-    if ( $changedTargetNode->attribute( 'main_node_id' ) == $changedTargetNode->attribute( 'node_id' ) )
-    {
-        $changedTargetObject = $changedTargetNode->object();
-        $selectedParentObject = $selectedNodeParent->object();
-        if ( $changedTargetObject->attribute( 'section_id' ) != $selectedParentObject->attribute( 'section_id' ) )
-        {
 
-            eZContentObjectTreeNode::assignSectionToSubTree( $changedTargetNode->attribute( 'main_node_id' ),
-                                                             $selectedParentObject->attribute( 'section_id' ),
-                                                             $changedTargetObject->attribute( 'section_id' ) );
-        }
-    }
-
-    eZContentObject::fixReverseRelations( $objectID, 'swap' );
-    eZContentObject::fixReverseRelations( $selectedObjectID, 'swap' );
-
-    $db->commit();
-
-    // clear cache for new placement.
-    eZContentCacheManager::clearContentCacheIfNeeded( $objectID );
-
     return $module->redirectToView( 'view', array( $viewMode, $nodeID, $languageCode ) );
 }
 else if ( $module->isCurrentAction( 'SwapNodeRequest' ) )
@@ -681,78 +643,18 @@
         if ( !is_array( $selectedNodeIDArray ) )
             $selectedNodeIDArray = array();
 
-        $nodeAssignmentList = eZNodeAssignment::fetchForObject( $objectID, $object->attribute( 'current_version' ), 0, false );
-        $assignedNodes = $object->assignedNodes();
-
-        $parentNodeIDArray = array();
-        $setMainNode = false;
-        $hasMainNode = false;
-        foreach ( $assignedNodes as $assignedNode )
-        {
-            if ( $assignedNode->attribute( 'is_main' ) )
-                $hasMainNode = true;
-
-            $append = false;
-            foreach ( $nodeAssignmentList as $nodeAssignment )
-            {
-                if ( $nodeAssignment['parent_node'] == $assignedNode->attribute( 'parent_node_id' ) )
-                {
-                    $append = true;
-                    break;
-                }
-            }
-            if ( $append )
-            {
-                $parentNodeIDArray[] = $assignedNode->attribute( 'parent_node_id' );
-            }
-        }
-        if ( !$hasMainNode )
-            $setMainNode = true;
-
-        $mainNodeID = $existingNode->attribute( 'main_node_id' );
-        $objectName = $object->attribute( 'name' );
-
-        $db = eZDB::instance();
-        $db->begin();
-        $locationAdded = false;
-        $node = eZContentObjectTreeNode::fetch( $nodeID );
-        foreach ( $selectedNodeIDArray as $selectedNodeID )
-        {
-            if ( !in_array( $selectedNodeID, $parentNodeIDArray ) )
-            {
-                $parentNode = eZContentObjectTreeNode::fetch( $selectedNodeID );
-                $parentNodeObject = $parentNode->attribute( 'object' );
-
-                $canCreate = ( ( $parentNode->checkAccess( 'create', $class->attribute( 'id' ), $parentNodeObject->attribute( 'contentclass_id' ) ) == 1 ) ||
-                               ( $parentNode->canAddLocation() && $node->canRead() ) );
-
-                if ( $canCreate )
-                {
-                    $insertedNode = $object->addLocation( $selectedNodeID, true );
-
-                    // Now set is as published and fix main_node_id
-                    $insertedNode->setAttribute( 'contentobject_is_published', 1 );
-                    $insertedNode->setAttribute( 'main_node_id', $node->attribute( 'main_node_id' ) );
-                    $insertedNode->setAttribute( 'contentobject_version', $node->attribute( 'contentobject_version' ) );
-                    // Make sure the url alias is set updated.
-                    $insertedNode->updateSubTreePath();
-                    $insertedNode->sync();
-
-                    $locationAdded = true;
-                }
-            }
-        }
-        if ( $locationAdded )
-        {
-            if ( $object->attribute( 'contentclass_id' ) == $userClassID )
-            {
-                eZUser::cleanupCache();
-            }
-        }
-        $db->commit();
-
-        //include_once( 'kernel/classes/ezcontentcachemanager.php' );
-        eZContentCacheManager::clearContentCacheIfNeeded( $objectID );
+	    if ( eZTrigger::useTrigger( 'content_addlocation' ) )
+	    {
+	        $operationResult = eZOperationHandler::execute( 'content',
+	                                                        'addlocation', array( 'node_id' => $nodeID,
+	                                                                              'object_id' => $objectID,
+	                                                                              'select_node_id_array' => $selectedNodeIDArray ),
+	                                                         null, true );
+	    }
+	    else
+	    {
+	        eZContentOperationCollection::addAssignment( $nodeID, $objectID, $selectedNodeIDArray );
+	    }
     }
     else if ( $module->isCurrentAction( 'SelectAssignmentLocation' ) )
     {
@@ -902,40 +804,28 @@
     }
     else
     {
-        $mainNodeChanged = false;
-        $nodeAssignmentList = eZNodeAssignment::fetchForObject( $objectID, $object->attribute( 'current_version' ), 0, false );
-        $nodeAssignmentIDList = array();
-
-        $db = eZDB::instance();
-        $db->begin();
-        foreach ( $nodeRemoveList as $key => $node )
-        {
-            foreach ( $nodeAssignmentList as $nodeAssignmentKey => $nodeAssignment )
-            {
-                if ( $nodeAssignment['parent_node'] == $node->attribute( 'parent_node_id' ) )
-                {
-                    $nodeAssignmentIDList[] = $nodeAssignment['id'];
-                    unset( $nodeAssignmentList[$nodeAssignmentKey] );
-                }
-            }
-
-            if ( $node->attribute( 'node_id' ) == $node->attribute( 'main_node_id' ) )
-                $mainNodeChanged = true;
-            $node->removeThis();
-        }
-        eZNodeAssignment::purgeByID( array_unique( $nodeAssignmentIDList ) );
-
-        if ( $mainNodeChanged )
-        {
-            $allNodes = $object->assignedNodes();
-            $mainNode = $allNodes[0];
-            eZContentObjectTreeNode::updateMainNodeID( $mainNode->attribute( 'node_id' ), $objectID, false, $mainNode->attribute( 'parent_node_id' ) );
-        }
-        $db->commit();
+	    if ( eZTrigger::useTrigger( 'content_removelocation' ) )
+	    {
+	        include_once( 'extension/gundj/classes/gundjnotify.php' );
+	        $remoteArray = gundjNotify::prepareRemoteArray( $removeList );
+	        
+	        $operationResult = eZOperationHandler::execute( 'content',
+	                                                        'removelocation',
+	                                                         array( 'node_id' => $nodeID,
+	                                                                'object_id' => $objectID,
+	                                                                'node_list' => $removeList,
+	                                                                'move_to_trash' => false,
+	                                                                'remote_array' => $remoteArray ),
+	                                                          null, true );
+	    }
+	    else
+	    {
+	        eZContentOperationCollection::removeAssignment( $nodeID, $objectID, $removeList, false );
+	    }
     }
 
     //include_once( 'kernel/classes/ezcontentcachemanager.php' );
-    eZContentCacheManager::clearObjectViewCacheIfNeeded( $objectID );
+    //eZContentCacheManager::clearObjectViewCacheIfNeeded( $objectID );
     // clear user policy cache if this was a user object
     if ( $object->attribute( 'contentclass_id' ) == $userClassID )
     {
Index: kernel/content/ezcontentoperationcollection.php
===================================================================
--- kernel/content/ezcontentoperationcollection.php	(revision 21470)
+++ kernel/content/ezcontentoperationcollection.php	(working copy)
@@ -705,6 +705,195 @@
         $object = eZContentObject::fetch( $objectID );
         $object->cleanupInternalDrafts( eZUser::currentUserID() );
     }
+
+    function moveNode( $nodeID, $objectID, $newParentNodeID )
+    {
+	    if( !eZContentObjectTreeNodeOperations::move( $nodeID, $newParentNodeID ) )
+	    {
+	        eZDebug::writeError( "Failed to move node $nodeID as child of parent node $newParentNodeID",
+	                             'content/action' );
+
+	        return array( 'status' => false );
+	    }
+
+	    eZContentObject::fixReverseRelations( $objectID, 'move' );
+
+	    return array( 'status' => true );
+
+    }
+
+    static function addAssignment( $nodeID, $objectID, $selectedNodeIDArray )
+    {
+        $ini = eZINI::instance();
+        $userClassID = $ini->variable( "UserSettings", "UserClassID" );
+
+    	$object = eZContentObject::fetch( $objectID );
+        $class = $object->contentClass();
+
+    	$nodeAssignmentList = eZNodeAssignment::fetchForObject( $objectID, $object->attribute( 'current_version' ), 0, false );
+        $assignedNodes = $object->assignedNodes();
+
+        $parentNodeIDArray = array();
+
+        foreach ( $assignedNodes as $assignedNode )
+        {
+            $append = false;
+            foreach ( $nodeAssignmentList as $nodeAssignment )
+            {
+                if ( $nodeAssignment['parent_node'] == $assignedNode->attribute( 'parent_node_id' ) )
+                {
+                    $append = true;
+                    break;
+                }
+            }
+            if ( $append )
+            {
+                $parentNodeIDArray[] = $assignedNode->attribute( 'parent_node_id' );
+            }
+        }
+
+        $db = eZDB::instance();
+        $db->begin();
+        $locationAdded = false;
+        $node = eZContentObjectTreeNode::fetch( $nodeID );
+        foreach ( $selectedNodeIDArray as $selectedNodeID )
+        {
+            if ( !in_array( $selectedNodeID, $parentNodeIDArray ) )
+            {
+                $parentNode = eZContentObjectTreeNode::fetch( $selectedNodeID );
+                $parentNodeObject = $parentNode->attribute( 'object' );
+
+                $canCreate = ( ( $parentNode->checkAccess( 'create', $class->attribute( 'id' ), $parentNodeObject->attribute( 'contentclass_id' ) ) == 1 ) ||
+                               ( $parentNode->canAddLocation() && $node->canRead() ) );
+
+                if ( $canCreate )
+                {
+                    $insertedNode = $object->addLocation( $selectedNodeID, true );
+
+                    // Now set is as published and fix main_node_id
+                    $insertedNode->setAttribute( 'contentobject_is_published', 1 );
+                    $insertedNode->setAttribute( 'main_node_id', $node->attribute( 'main_node_id' ) );
+                    $insertedNode->setAttribute( 'contentobject_version', $node->attribute( 'contentobject_version' ) );
+                    // Make sure the url alias is set updated.
+                    $insertedNode->updateSubTreePath();
+                    $insertedNode->sync();
+
+                    $locationAdded = true;
+                }
+            }
+        }
+        if ( $locationAdded )
+        {
+            if ( $object->attribute( 'contentclass_id' ) == $userClassID )
+            {
+                eZUser::cleanupCache();
+            }
+        }
+        $db->commit();
+
+        eZContentCacheManager::clearContentCacheIfNeeded( $objectID );
+
+        return array( 'status' => true );
+    }
+
+    static function removeAssignment( $objectID, $nodeID, $deleteIDArray, $moveToTrash, $remoteArray = array() )
+    {
+    	eZContentObjectTreeNode::removeSubtrees( $deleteIDArray, $moveToTrash );
+    	return array( 'status' => true );
+    }
+
+    static function changeHideStatus( $nodeID )
+    {
+        $curNode = eZContentObjectTreeNode::fetch( $nodeID );
+        if ( is_object( $curNode ) )
+        {
+            if ( $curNode->attribute( 'is_hidden' ) )
+                eZContentObjectTreeNode::unhideSubTree( $curNode );
+            else
+                eZContentObjectTreeNode::hideSubTree( $curNode );
+        }
+        return array( 'status' => true );
+    }
+
+    static function swapNode( $nodeID, $selectedNodeID, $nodeList = array() )
+    {
+    	$ini = eZINI::instance();
+        $userClassID = $ini->variable( "UserSettings", "UserClassID" );
+
+        $node = eZContentObjectTreeNode::fetch( $nodeID );
+    	$selectedNode = eZContentObjectTreeNode::fetch( $selectedNodeID );
+    	$object = $node->object();
+    	$nodeParentNodeID = $node->attribute( 'parent_node_id' );
+    	$nodeParent = $node->attribute( 'parent' );
+
+    	$objectID = $object->attribute( 'id' );
+        $objectVersion = $object->attribute( 'current_version' );
+        $class = $object->contentClass();
+        $classID = $class->attribute( 'id' );
+
+        $selectedObject = $selectedNode->object();
+        $selectedObjectID = $selectedObject->attribute( 'id' );
+        $selectedObjectVersion = $selectedObject->attribute( 'current_version' );
+        $selectedNodeParentNodeID = $selectedNode->attribute( 'parent_node_id' );
+        $selectedNodeParent = $selectedNode->attribute( 'parent' );
+
+        $node->setAttribute( 'contentobject_id', $selectedObjectID );
+        $node->setAttribute( 'contentobject_version', $selectedObjectVersion );
+
+        $db = eZDB::instance();
+        $db->begin();
+        $node->store();
+        $selectedNode->setAttribute( 'contentobject_id', $objectID );
+        $selectedNode->setAttribute( 'contentobject_version', $objectVersion );
+        $selectedNode->store();
+
+        // clear user policy cache if this was a user object
+        if ( $object->attribute( 'contentclass_id' ) == $userClassID )
+        {
+            eZUser::cleanupCache();
+        }
+
+        // modify path string
+        $changedOriginalNode = eZContentObjectTreeNode::fetch( $nodeID );
+        $changedOriginalNode->updateSubTreePath();
+        $changedTargetNode = eZContentObjectTreeNode::fetch( $selectedNodeID );
+        $changedTargetNode->updateSubTreePath();
+
+        // modify section
+        if ( $changedOriginalNode->attribute( 'main_node_id' ) == $changedOriginalNode->attribute( 'node_id' ) )
+        {
+            $changedOriginalObject = $changedOriginalNode->object();
+            $parentObject = $nodeParent->object();
+            if ( $changedOriginalObject->attribute( 'section_id' ) != $parentObject->attribute( 'section_id' ) )
+            {
+
+                eZContentObjectTreeNode::assignSectionToSubTree( $changedOriginalNode->attribute( 'main_node_id' ),
+                                                                 $parentObject->attribute( 'section_id' ),
+                                                                 $changedOriginalObject->attribute( 'section_id' ) );
+            }
+        }
+        if ( $changedTargetNode->attribute( 'main_node_id' ) == $changedTargetNode->attribute( 'node_id' ) )
+        {
+            $changedTargetObject = $changedTargetNode->object();
+            $selectedParentObject = $selectedNodeParent->object();
+            if ( $changedTargetObject->attribute( 'section_id' ) != $selectedParentObject->attribute( 'section_id' ) )
+            {
+
+                eZContentObjectTreeNode::assignSectionToSubTree( $changedTargetNode->attribute( 'main_node_id' ),
+                                                                 $selectedParentObject->attribute( 'section_id' ),
+                                                                 $changedTargetObject->attribute( 'section_id' ) );
+            }
+        }
+
+        eZContentObject::fixReverseRelations( $objectID, 'swap' );
+        eZContentObject::fixReverseRelations( $selectedObjectID, 'swap' );
+
+        $db->commit();
+
+        // clear cache for new placement.
+        eZContentCacheManager::clearContentCacheIfNeeded( $objectID );
+
+        return array( 'status' => true );
+    }
 }
-
-?>
+?>
\ No newline at end of file
Index: kernel/content/hide.php
===================================================================
--- kernel/content/hide.php	(revision 21470)
+++ kernel/content/hide.php	(working copy)
@@ -36,10 +36,17 @@
 if ( !$curNode->attribute( 'can_hide' ) )
     return $Module->handleError( eZError::KERNEL_ACCESS_DENIED, 'kernel' );
 
-if ( $curNode->attribute( 'is_hidden' ) )
-    eZContentObjectTreeNode::unhideSubTree( $curNode );
+if ( eZTrigger::useTrigger( 'content_hide' ) )
+{
+    $operationResult = eZOperationHandler::execute( 'content',
+                                                    'hide',
+                                                     array( 'node_id' => $NodeID ),
+                                                     null, true );
+}
 else
-    eZContentObjectTreeNode::hideSubTree( $curNode );
+{
+    eZContentOperationCollection::changeHideStatus( $NodeID );
+}
 
 
 //include_once( 'kernel/classes/ezredirectmanager.php' );
Index: kernel/content/operation_definition.php
===================================================================
--- kernel/content/operation_definition.php	(revision 21470)
+++ kernel/content/operation_definition.php	(working copy)
@@ -241,4 +241,223 @@
                                                            'keys' => array( 'object_id',
                                                                             'version' ) ),
                                                     ) );
+
+$OperationList['move'] = array( 'name' => 'move',
+                                'default_call_method' => array( 'include_file' => 'kernel/content/ezcontentoperationcollection.php',
+                                                                'class' => 'eZContentOperationCollection' ),
+                                'parameter_type' => 'standard',
+                                'parameters' => array( array( 'name' => 'node_id',
+                                                              'type' => 'integer',
+                                                              'required' => true ),
+                                                       array( 'name' => 'object_id',
+                                                              'type' => 'integer',
+                                                              'required' => true ),
+                                                       array( 'name' => 'new_parent_node_id',
+                                                              'type' => 'integer',
+                                                              'required' => true ) ),
+                                'keys' => array( 'node_id', 'object_id', 'new_parent_node_id' ),
+
+                                'body' => array( array( 'type' => 'trigger',
+                                                        'name' => 'pre_move',
+                                                        'keys' => array( 'node_id',
+                                                                         'object_id',
+                                                                         'new_parent_node_id'
+                                                                        ) ),
+                                                  array( 'type' => 'method',
+                                                        'name' => 'move-node',
+                                                        'frequency' => 'once',
+                                                        'method' => 'moveNode',
+                                                        ),
+                                                  array( 'type' => 'trigger',
+                                                         'name' => 'post_move',
+                                                         'keys' => array( 'node_id',
+                                                                          'object_id',
+                                                                          'new_parent_node_id'
+                                                                         ) )
+                                                )
+                              );
+
+$OperationList['addlocation'] = array(  'name' => 'addlocation',
+                                        'default_call_method' => array( 'include_file' => 'kernel/content/ezcontentoperationcollection.php',
+                                                                        'class' => 'eZContentOperationCollection' ),
+                                        'parameter_type' => 'standard',
+                                        'parameters' => array( array( 'name' => 'node_id',
+                                                                      'type' => 'integer',
+                                                                      'required' => true ),
+                                                               array( 'name' => 'object_id',
+                                                                      'type' => 'integer',
+                                                                      'required' => true ),
+                                                               array( 'name' => 'select_node_id_array',
+                                                                      'type' => 'array',
+                                                                      'required' => true ) ),
+                                        'keys' => array( 'node_id', 'object_id', 'select_node_id_array' ),
+
+                                        'body' => array( array( 'type' => 'trigger',
+                                                                'name' => 'pre_addlocation',
+                                                                'keys' => array( 'node_id',
+                                                                                 'object_id',
+                                                                                 'select_node_id_array'
+                                                                                 )
+                                                               ),
+                                                         array( 'type' => 'method',
+                                                                'name' => 'add-location',
+                                                                'frequency' => 'once',
+                                                                'method' => 'addAssignment',
+                                                                ),
+                                                         array( 'type' => 'trigger',
+                                                                'name' => 'post_addlocation',
+                                                                'keys' => array( 'node_id',
+                                                                                 'object_id',
+                                                                                 'select_node_id_array'
+                                                                                 )
+                                                               ),
+                                                         )
+                                     );
+
+$OperationList['removelocation'] = array(   'name' => 'removelocation',
+                                            'default_call_method' => array( 'include_file' => 'kernel/content/ezcontentoperationcollection.php',
+                                                                            'class' => 'eZContentOperationCollection' ),
+                                            'parameter_type' => 'standard',
+                                            'parameters' => array( array( 'name' => 'node_id',
+                                                                          'type' => 'integer',
+                                                                          'required' => true ),
+                                                                   array( 'name' => 'object_id',
+                                                                          'type' => 'integer',
+                                                                          'required' => true ),
+                                                                   array( 'name' => 'node_list',
+                                                                          'type' => 'array',
+                                                                          'required' => true ),
+                                                                   array( 'name' => 'move_to_trash',
+                                                                          'type' => 'array',
+                                                                          'required' => true ),
+                                                                   array( 'name' => 'remote_array',
+                                                                          'type' => 'array',
+                                                                          'required' => true ),        ),
+                                            'keys' => array( 'node_id', 'object_id', 'node_list', 'move_to_trash', 'remote_array'  ),
+
+                                            'body' => array( array( 'type' => 'trigger',
+                                                                    'name' => 'post_removelocation',
+                                                                    'keys' => array( 'node_id',
+                                                                                     'object_id',
+                                                                                     'node_list',
+                                                                                     'move_to_trash',
+                                                                                     'remote_array'
+                                                                                     ) ),
+                                                             array( 'type' => 'method',
+                                                                    'name' => 'remove-location',
+                                                                    'frequency' => 'once',
+                                                                    'method' => 'removeAssignment',
+                                                                    ) ),
+                                                             array( 'type' => 'trigger',
+                                                                    'name' => 'post_removelocation',
+                                                                    'keys' => array( 'node_id',
+                                                                                     'object_id',
+                                                                                     'node_list',
+                                                                                     'move_to_trash',
+                                                                                     'remote_array'
+                                                                                     ) ),
+                                        );
+
+$OperationList['delete'] = array( 'name' => 'delete',
+                                            'default_call_method' => array( 'include_file' => 'kernel/content/ezcontentoperationcollection.php',
+                                                                            'class' => 'eZContentOperationCollection' ),
+                                            'parameter_type' => 'standard',
+                                            'parameters' => array( array( 'name' => 'node_id',
+                                                                          'type' => 'integer',
+                                                                          'required' => true ),
+                                                                   array( 'name' => 'object_id',
+                                                                          'type' => 'integer',
+                                                                          'required' => true ),
+                                                                   array( 'name' => 'node_list',
+                                                                          'type' => 'array',
+                                                                          'required' => true ),
+                                                                   array( 'name' => 'move_to_trash',
+                                                                          'type' => 'integer',
+                                                                          'required' => true ),
+                                                                   array( 'name' => 'remote_array',
+                                                                          'type' => 'array',
+                                                                          'required' => true ), ),
+                                            'keys' => array( 'node_id', 'object_id', 'node_list', 'move_to_trash', 'remote_array' ),
+
+                                            'body' => array( array( 'type' => 'trigger',
+                                                                    'name' => 'post_delete',
+                                                                    'keys' => array( 'node_id',
+                                                                                     'object_id',
+                                                                                     'node_list',
+                                                                                     'move_to_trash',
+                                                                                     'remote_array'
+                                                                                     ) ),
+                                                             array( 'type' => 'method',
+                                                                    'name' => 'remove-location',
+                                                                    'frequency' => 'once',
+                                                                    'method' => 'removeAssignment',
+                                                                    ) ),
+                                                             array( 'type' => 'trigger',
+                                                                    'name' => 'post_delete',
+                                                                    'keys' => array( 'node_id',
+                                                                                     'object_id',
+                                                                                     'node_list',
+                                                                                     'move_to_trash',
+                                                                                     'remote_array'
+                                                                                     ) ),
+                                        );
+
+$OperationList['hide'] = array( 'name' => 'hide',
+                                'default_call_method' => array( 'include_file' => 'kernel/content/ezcontentoperationcollection.php',
+                                                                'class' => 'eZContentOperationCollection' ),
+                                'parameter_type' => 'standard',
+                                'parameters' => array( array( 'name' => 'node_id',
+                                                              'type' => 'integer',
+                                                              'required' => true ),
+                                                      ),
+                                'keys' => array( 'node_id' ),
+
+                                'body' => array( array( 'type' => 'trigger',
+                                                        'name' => 'pre_hide',
+                                                        'keys' => array( 'node_id' ),
+                                                       ),
+                                                 array( 'type' => 'method',
+                                                        'name' => 'hide',
+                                                        'frequency' => 'once',
+                                                        'method' => 'changeHideStatus',
+                                                        ),
+                                                 array( 'type' => 'trigger',
+                                                        'name' => 'post_hide',
+                                                        'keys' => array( 'node_id' )
+                                                       )
+                                                 )
+                              );
+
+$OperationList['swap'] = array( 'name' => 'swap',
+                                'default_call_method' => array( 'include_file' => 'kernel/content/ezcontentoperationcollection.php',
+                                                                'class' => 'eZContentOperationCollection' ),
+                                'parameter_type' => 'standard',
+                                'parameters' => array( array( 'name' => 'node_id',
+                                                              'type' => 'integer',
+                                                              'required' => true ),
+                                                       array( 'name' => 'selected_node_id',
+                                                              'type' => 'integer',
+                                                              'required' => true ),
+                                                       array( 'name' => 'node_list',
+                                                              'type' => 'array',
+                                                              'required' => true ),
+                                                      ),
+                                'keys' => array( 'node_id', 'selected_node_id', 'node_list' ),
+
+                                'body' => array( array( 'type' => 'trigger',
+                                                        'name' => 'pre_swap',
+                                                        'keys' => array( 'node_list' ),
+                                                       ),
+                                                 array( 'type' => 'method',
+                                                        'name' => 'swap',
+                                                        'frequency' => 'once',
+                                                        'method' => 'swapNode',
+                                                        ),
+                                                 array( 'type' => 'trigger',
+                                                        'name' => 'post_swap',
+                                                        'keys' => array( 'node_list' )
+                                                       )
+                                                 )
+                              );
+
 ?>
Index: kernel/content/removeobject.php
===================================================================
--- kernel/content/removeobject.php	(revision 21470)
+++ kernel/content/removeobject.php	(working copy)
@@ -96,7 +96,25 @@
 if ( $http->hasPostVariable( "ConfirmButton" ) or
      $hideRemoveConfirm )
 {
-    eZContentObjectTreeNode::removeSubtrees( $deleteIDArray, $moveToTrash );
+    if ( eZTrigger::useTrigger( 'content_delete' ) )
+    {
+        include_once( 'extension/gundj/classes/gundjnotify.php' );
+        $remoteArray = gundjNotify::prepareRemoteArray( $deleteIDArray );
+
+        $operationResult = eZOperationHandler::execute( 'content',
+                                                        'delete',
+                                                         array( 'node_id' => $contentNodeID,
+                                                                'object_id' => $contentObjectID,
+                                                                'node_list' => $deleteIDArray,
+                                                                'move_to_trash' => $moveToTrash,
+                                                                'remote_array' => $remoteArray ),
+                                                          null, true );
+    }
+    else
+    {
+        eZContentOperationCollection::removeAssignment( $contentNodeID, $contentObjectID, $deleteIDArray, $moveToTrash );
+    }
+
     return $Module->redirectToView( 'view', array( $viewMode, $contentNodeID, $contentLanguage ) );
 }
 
@@ -155,7 +173,24 @@
     }
     if ( $canRemove )
     {
-        eZContentObjectTreeNode::removeSubtrees( $deleteIDArray, $moveToTrash );
+        if ( eZTrigger::useTrigger( 'content_delete' ) )
+	    {
+	        include_once( 'extension/gundj/classes/gundjnotify.php' );
+	        $remoteArray = gundjNotify::prepareRemoteArray( $deleteIDArray );
+
+	        $operationResult = eZOperationHandler::execute( 'content',
+	                                                        'delete',
+	                                                         array( 'node_id' => $contentNodeID,
+	                                                                'object_id' => $contentObjectID,
+	                                                                'node_list' => $deleteIDArray,
+	                                                                'move_to_trash' => $moveToTrash,
+	                                                                'remote_array' => $remoteArray ),
+	                                                          null, true );
+	    }
+	    else
+	    {
+	        eZContentOperationCollection::removeAssignment( $contentNodeID, $contentObjectID, $deleteIDArray, $moveToTrash );
+	    }
         return $Module->redirectToView( 'view', array( $viewMode, $contentNodeID, $contentLanguage ) );
     }
 }
Index: kernel/content/view.php
===================================================================
--- kernel/content/view.php	(revision 21470)
+++ kernel/content/view.php	(working copy)
@@ -97,18 +97,6 @@
 if ( isset( $Params['AttributeValidation'] ) )
     $validation = $Params['AttributeValidation'];
 
-// Check if read operations should be used
-$workflowINI = eZINI::instance( 'workflow.ini' );
-$operationList = $workflowINI->variableArray( 'OperationSettings', 'AvailableOperations' );
-$operationList = array_unique( array_merge( $operationList, $workflowINI->variable( 'OperationSettings', 'AvailableOperationList' ) ) );
-if ( in_array( 'content_read', $operationList ) )
-{
-    $useTriggers = true;
-}
-else
-{
-    $useTriggers = false;
-}
 
 $res = eZTemplateDesignResource::instance();
 $keys = $res->keys();
@@ -133,14 +121,14 @@
 
 $operationResult = array();
 
-if ( $useTriggers == true )
+if ( eZTrigger::useTrigger( 'content_read' ) )
 {
     //include_once( 'lib/ezutils/classes/ezoperationhandler.php' );
     //include_once( 'kernel/classes/eztrigger.php' );
 
     $operationResult = eZOperationHandler::execute( 'content', 'read', array( 'node_id' => $NodeID,
                                                                               'user_id' => $user->id(),
-                                                                              'language_code' => $LanguageCode ), null, $useTriggers );
+                                                                              'language_code' => $LanguageCode ), null, true );
 }
 
 if ( ( array_key_exists(  'status', $operationResult ) && $operationResult['status'] != eZModuleOperationInfo::STATUS_CONTINUE ) )
Index: settings/workflow.ini
===================================================================
--- settings/workflow.ini	(revision 21470)
+++ settings/workflow.ini	(working copy)
@@ -39,6 +39,12 @@
 AvailableOperationList[]=shop_checkout
 AvailableOperationList[]=shop_addtobasket
 AvailableOperationList[]=shop_updatebasket
+AvailableOperationList[]=content_move
+AvailableOperationList[]=content_addlocation
+AvailableOperationList[]=content_delete
+AvailableOperationList[]=content_hide
+AvailableOperationList[]=content_removelocation
+AvailableOperationList[]=content_swap
 
 # Setting for shipping cost for the simple shipping workflow
 [SimpleShippingWorkflow]
