|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* @copyright 2018, Roeland Jago Douma <[email protected]> |
|
4
|
|
|
* |
|
5
|
|
|
* @author Roeland Jago Douma <[email protected]> |
|
6
|
|
|
* |
|
7
|
|
|
* @license GNU AGPL version 3 or any later version |
|
8
|
|
|
* |
|
9
|
|
|
* This program is free software: you can redistribute it and/or modify |
|
10
|
|
|
* it under the terms of the GNU Affero General Public License as |
|
11
|
|
|
* published by the Free Software Foundation, either version 3 of the |
|
12
|
|
|
* License, or (at your option) any later version. |
|
13
|
|
|
* |
|
14
|
|
|
* This program is distributed in the hope that it will be useful, |
|
15
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17
|
|
|
* GNU Affero General Public License for more details. |
|
18
|
|
|
* |
|
19
|
|
|
* You should have received a copy of the GNU Affero General Public License |
|
20
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
21
|
|
|
* |
|
22
|
|
|
*/ |
|
23
|
|
|
namespace OCA\Richdocuments\Db; |
|
24
|
|
|
|
|
25
|
|
|
use OCP\AppFramework\Db\Entity; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* Class WopiEntity |
|
29
|
|
|
* |
|
30
|
|
|
* @package OCA\Richdocuments\Db |
|
31
|
|
|
* |
|
32
|
|
|
* @method void setOwnerUid(string $uid) |
|
33
|
|
|
* @method string getOwnerUid() |
|
34
|
|
|
* @method void setEditorUid(string $uid) |
|
35
|
|
|
* @method string getEditorUid() |
|
36
|
|
|
* @method void setFileid(int $fileid) |
|
37
|
|
|
* @method int getFileid() |
|
38
|
|
|
* @method void setVersion(int $version) |
|
39
|
|
|
* @method int getVersion() |
|
40
|
|
|
* @method void setCanwrite(bool $canwrite) |
|
41
|
|
|
* @method bool getCanwrite() |
|
42
|
|
|
* @method void setServerHost(string $host) |
|
43
|
|
|
* @method string getServerHost() |
|
44
|
|
|
* @method void setToken(string $token) |
|
45
|
|
|
* @method string getToken() |
|
46
|
|
|
* @method void setExpiry(int $expiry) |
|
47
|
|
|
* @method int getExpiry() |
|
48
|
|
|
*/ |
|
49
|
|
|
class Wopi extends Entity { |
|
50
|
|
|
/** @var string */ |
|
51
|
|
|
protected $ownerUid; |
|
52
|
|
|
|
|
53
|
|
|
/** @var string */ |
|
54
|
|
|
protected $editorUid; |
|
55
|
|
|
|
|
56
|
|
|
/** @var int */ |
|
57
|
|
|
protected $fileid; |
|
58
|
|
|
|
|
59
|
|
|
/** @var int */ |
|
60
|
|
|
protected $version; |
|
61
|
|
|
|
|
62
|
|
|
/** @var bool */ |
|
63
|
|
|
protected $canwrite; |
|
64
|
|
|
|
|
65
|
|
|
/** @var string */ |
|
66
|
|
|
protected $serverHost; |
|
67
|
|
|
|
|
68
|
|
|
/** @var string */ |
|
69
|
|
|
protected $token; |
|
70
|
|
|
|
|
71
|
|
|
/** @var int */ |
|
72
|
|
|
protected $expiry; |
|
73
|
|
|
|
|
74
|
|
|
public function __construct() { |
|
75
|
|
|
$this->addType('owner_uid', 'string'); |
|
76
|
|
|
$this->addType('editor_uid', 'string'); |
|
77
|
|
|
$this->addType('fileid', 'int'); |
|
78
|
|
|
$this->addType('version', 'int'); |
|
79
|
|
|
$this->addType('canwrite', 'bool'); |
|
80
|
|
|
$this->addType('server_host', 'string'); |
|
81
|
|
|
$this->addType('token', 'string'); |
|
82
|
|
|
$this->addType('expiry', 'int'); |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
} |
|
86
|
|
|
|