Blame view

php/classes/SharedCatalogMgrImpl.php 895 Bytes
169f14d2   Benjamin Renard   Add shared object...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
 * @class SharedCatalogMgrImpl
 * @version 
 * 
 */

class SharedCatalogMgrImpl extends SharedObjectMgrAbstract {
	public static $ROOT_DIR_NAME = "CAT";
	
	private $catMgr = NULL;
	
	function __construct() {
		$this->rootdirname  = self::$ROOT_DIR_NAME;
		$this->catMgr = new CatalogMgr(TRUE);
		parent::__construct();
	}
	
	protected function getDataInfo($object_id) {
		$result = $this->catMgr->getObject($object_id, 'sharedcatalog');
		
		if (!isset($result) || array_key_exists('error', $result))
			return array();
		
		return $result;
	}
	
09eefb2d   Benjamin Renard   Shared TT and Cat...
28
29
	protected function addData($src_object_path, $dst_data_path, $newId, $newName, $newDescription) {
		$result = $this->catMgr->copyTT($src_object_path, $dst_data_path, $newId, $newName, $newDescription);
169f14d2   Benjamin Renard   Add shared object...
30
31
32
33
34
35
36
		if (!$result)
			return array('success' => FALSE, 'message' => 'Cannot copy the Catalog');
		return array('success' => TRUE);
	}
}

?>