This repository has been archived by the owner on Nov 25, 2020. It is now read-only.
/
RepositoryInterface.php
284 lines (238 loc) · 6.27 KB
/
RepositoryInterface.php
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<?php
/*
* Copyright 2007-2016 Abstrium <contact (at) pydio.com>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pydio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Pydio. If not, see <http://www.gnu.org/licenses/>.
*
* The latest code can be found at <https://pydio.com/>.
*/
namespace Pydio\Core\Model;
defined('AJXP_EXEC') or die('Access not allowed');
use Pydio\Access\Core\AbstractAccessDriver;
use Pydio\Access\Core\Filter\ContentFilter;
/**
* The basic abstraction of a data store. Can map a FileSystem, but can also map data from a totally
* different source, like the application configurations, a mailbox, etc.
* @package Pydio
* @subpackage Core
*/
interface RepositoryInterface
{
/**
* @return AbstractAccessDriver
*/
public function getDriverInstance();
/**
* @param AbstractAccessDriver $driverInstance
*/
public function setDriverInstance($driverInstance);
/**
* @param ContentFilter $contentFilter
*/
public function setContentFilter($contentFilter);
/**
* Check if a ContentFilter is set or not
* @return bool
*/
public function hasContentFilter();
/**
* @return ContentFilter
*/
public function getContentFilter();
/**
* Create a shared version of this repository
* @param string $newLabel
* @param array $newOptions
* @param string $parentId
* @param string $owner
* @param string $uniqueUser
* @return RepositoryInterface
*/
public function createSharedChild($newLabel, $newOptions, $parentId, $owner, $uniqueUser = null);
/**
* Create a child from this repository if it's a template
* @param string $newLabel
* @param array $newOptions
* @param string $creator
* @param string $uniqueUser
* @return RepositoryInterface
*/
public function createTemplateChild($newLabel, $newOptions, $creator = null, $uniqueUser = null);
/**
* Recompute uuid
* @return bool
*/
public function upgradeId();
/**
* Get a uuid
* @param bool $serial
* @return string
*/
public function getUniqueId($serial = false);
/**
* Alias for this repository
* @return string
*/
public function getSlug();
/**
* Use the slugify function to generate an alias from the label
* @param string $slug
* @return void
*/
public function setSlug($slug = null);
/**
* Get the <client_settings> content of the manifest.xml
* @return \DOMElement|\DOMNodeList|string
*/
public function getClientSettings();
/**
* Add options
* @param $oName
* @param $oValue
* @return void
*/
public function addOption($oName, $oValue);
/**
* Get the repository options, filtered in various maners
* @param string $oName
* @param bool $safe Do not filter
* @param UserInterface $resolveUser
* @return mixed|string
* @throws \Exception
*/
public function getOption($oName, $safe = false, $resolveUser = null);
/**
* Get the options that already have a value
* @return array
*/
public function getOptionsDefined();
/**
* Get the DEFAULT_RIGHTS option
* @return string
*/
public function getDefaultRight();
/**
* The the access driver type
* @return String
*/
public function getAccessType();
/**
* The label of this repository
* @return String
*/
public function getDisplay();
/**
* @return string
*/
public function getId();
/**
* @return boolean
*/
public function getCreate();
/**
* @param boolean $create
*/
public function setCreate($create);
/**
* @param String $accessType
*/
public function setAccessType($accessType);
/**
* @param String $display
*/
public function setDisplay($display);
/**
* @param int $id
*/
public function setId($id);
/**
* @return bool
*/
public function isWriteable();
/**
* @param bool $w
*/
public function setWriteable($w);
/**
* @param string $id
*/
public function setDisplayStringId($id);
/**
* @param string $repoParentId
* @param string|null $ownerUserId
* @param string|null $childUserId
*/
public function setOwnerData($repoParentId, $ownerUserId = null, $childUserId = null);
/**
* @return string|null
*/
public function getOwner();
/**
* @return string|null
*/
public function getParentId();
/**
* @return string|null
*/
public function getUniqueUser();
/**
* @return bool
*/
public function hasOwner();
/**
* @return bool
*/
public function hasParent();
/**
* @param $bool
*/
public function setInferOptionsFromParent($bool);
/**
* @return bool
*/
public function getInferOptionsFromParent();
/**
* @param String $descriptionText
*/
public function setDescription($descriptionText);
/**
* @return string
*/
public function getAccessStatus();
/**
* @param string $accessStatus
*/
public function setAccessStatus($accessStatus);
/**
* @return string
*/
public function getRepositoryType();
/**
* @param string $repositoryType
*/
public function setRepositoryType($repositoryType);
/**
* @param bool $public
* @param null $ownerLabel
* @return String
*/
public function getDescription($public = false, $ownerLabel = null);
/**
* Infer a security scope for this repository. Will determine to whome the messages
* will be broadcasted.
* @return bool|string
*/
public function securityScope();
}