ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilCloudPlugin.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("class.ilCloudPluginConfig.php");
5include_once("class.ilObjCloud.php");
6
18{
22 protected $obj_id;
23
28
32 protected $table_name = "";
33
38
43
47 protected $max_file_size = 25;
48
52 //protected $async_drawing = false;
53
57 public function __construct($service_name, $obj_id, $cloud_modul_object = null)
58 {
59 $this->setObjId($obj_id);
60
61 $this->plugin_hook_object = ilCloudConnector::getPluginHookClass($service_name);
62 if (!is_object($this->plugin_hook_object))
63 {
65 }
66 $this->admin_config_object = new ilCloudPluginConfig($this->plugin_hook_object->getPluginConfigTableName());
67 if (!$this->read())
68 {
69 $this->create();
70 }
71
73 {
74 // in the context of deleting, it's possible that the ilObjCloud with this obj_id is already pushing up the daisies
75 // so instantiating it would lead to an error
76 if ($obj_id == 0 || ilObjCloud::_exists($obj_id, false, 'cld')) {
78 }
79 }
81 }
82
86 public function setObjId($obj_id)
87 {
88 $this->obj_id = $obj_id;
89 }
90
94 public function getObjId()
95 {
96 return $this->obj_id;
97 }
98
102 public function getPluginHookObject()
103 {
105 }
106
110 public function getAdminConfigObject()
111 {
113 }
114
119 {
120 $this->plugin_hook_object = $plugin_hook_object;
121 }
122
126 public function getTableName()
127 {
128 return $this->getPluginHookObject()->getPluginTableName();
129 }
130
131
152 {
153 $this->max_file_size = $max_file_size;
154 }
155
159 public function getMaxFileSize()
160 {
162 }
163
168 {
169 $this->cloud_modul_object = $cloud_modul_object;
170 }
171
175 public function getCloudModulObject()
176 {
178 }
179
183 public function getOwnerId()
184 {
185 include_once("./Modules/Cloud/classes/class.ilObjCloud.php");
186 $cloud_object = new ilObjCloud($this->getObjId(), false);
187 return $cloud_object->getOwnerId();
188 }
189
190 public function read(){}
191
192 public function create(){}
193
194 public function doUpdate(){}
195
196 public function doDelete(){}
197}
198
199?>
An exception for terminatinating execution or to throw for unit testing.
static getPluginHookClass($service_name)
Class ilCloudException.
Class ilCloudPluginConfig.
Class ilCloudPlugin.
setMaxFileSize($max_file_size)
__construct($service_name, $obj_id, $cloud_modul_object=null)
setCloudModulObject($cloud_modul_object)
getOwnerId()
$return integer
setPluginHookObject($plugin_hook_object)
Class ilObjCloud.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public