function perform()
 {
     if (!is_a($this->service_node, 'ContentServiceNode')) {
         return LIMB_STATUS_ERROR;
     }
     $content =& $this->service_node->getContentPart();
     $map_content_command = new MapObjectToDataspaceCommand($this->content_map, $content);
     $map_content_command->perform();
     $map_service_node_command = new MapServiceNodeToDataspaceCommand($this->service_node);
     $map_service_node_command->perform();
     return LIMB_STATUS_OK;
 }
 function testPerformOk()
 {
     $service_node = new ServiceNode();
     $node =& $service_node->getNodePart();
     $service =& $service_node->getServicePart();
     $node->set('id', $node_id = 50);
     $node->set('parent_id', $parent_id = 100);
     $node->set('identifier', $identifier = 'test identifier');
     $service->set('name', $service_name = 'test service');
     $service->set('title', $title = 'test title');
     $command = new MapServiceNodeToDataspaceCommand($service_node);
     $this->assertEqual($command->perform(), LIMB_STATUS_OK);
     $toolkit =& Limb::toolkit();
     $dataspace =& $toolkit->getDataspace();
     $this->assertEqual($dataspace->get('title'), $title);
     $this->assertEqual($dataspace->get('node_id'), $node_id);
     $this->assertEqual($dataspace->get('parent_node_id'), $parent_id);
     $this->assertEqual($dataspace->get('identifier'), $identifier);
     $this->assertEqual($dataspace->get('service_name'), $service_name);
 }
 function performInitDataspace()
 {
     include_once LIMB_SERVICE_NODE_DIR . '/commands/MapServiceNodeToDataspaceCommand.class.php';
     $command = new MapServiceNodeToDataspaceCommand($this->entity);
     return $command->perform();
 }