Completed
Push — master ( 8c93ef...03f220 )
by
unknown
47:39 queued 21:57
created
lib/public/FullTextSearch/Model/IDocumentAccess.php 1 patch
Indentation   +205 added lines, -205 removed lines patch added patch discarded remove patch
@@ -45,209 +45,209 @@
 block discarded – undo
45 45
  *
46 46
  */
47 47
 interface IDocumentAccess {
48
-	/**
49
-	 * Owner of the document can be set at the init of the object.
50
-	 *
51
-	 * @since 16.0.0
52
-	 *
53
-	 * IDocumentAccess constructor.
54
-	 *
55
-	 * @param string $ownerId
56
-	 */
57
-	public function __construct(string $ownerId = '');
58
-
59
-
60
-	/**
61
-	 * Set the Owner of the document.
62
-	 *
63
-	 * @since 16.0.0
64
-	 *
65
-	 * @param string $ownerId
66
-	 *
67
-	 * @return IDocumentAccess
68
-	 */
69
-	public function setOwnerId(string $ownerId): IDocumentAccess;
70
-
71
-	/**
72
-	 * Get the Owner of the document.
73
-	 *
74
-	 * @since 16.0.0
75
-	 *
76
-	 * @return string
77
-	 */
78
-	public function getOwnerId(): string;
79
-
80
-
81
-	/**
82
-	 * Set the viewer of the document.
83
-	 *
84
-	 * @since 16.0.0
85
-	 *
86
-	 * @param string $viewerId
87
-	 *
88
-	 * @return IDocumentAccess
89
-	 */
90
-	public function setViewerId(string $viewerId): IDocumentAccess;
91
-
92
-	/**
93
-	 * Get the viewer of the document.
94
-	 *
95
-	 * @since 16.0.0
96
-	 *
97
-	 * @return string
98
-	 */
99
-	public function getViewerId(): string;
100
-
101
-
102
-	/**
103
-	 * Set the list of users that have read access to the document.
104
-	 *
105
-	 * @since 16.0.0
106
-	 *
107
-	 * @param array $users
108
-	 *
109
-	 * @return IDocumentAccess
110
-	 */
111
-	public function setUsers(array $users): IDocumentAccess;
112
-
113
-	/**
114
-	 * Add an entry to the list of users that have read access to the document.
115
-	 *
116
-	 * @since 16.0.0
117
-	 *
118
-	 * @param string $user
119
-	 *
120
-	 * @return IDocumentAccess
121
-	 */
122
-	public function addUser(string $user): IDocumentAccess;
123
-
124
-	/**
125
-	 * Add multiple entries to the list of users that have read access to the
126
-	 * document.
127
-	 *
128
-	 * @since 16.0.0
129
-	 *
130
-	 * @param array $users
131
-	 *
132
-	 * @return IDocumentAccess
133
-	 */
134
-	public function addUsers($users): IDocumentAccess;
135
-
136
-	/**
137
-	 * Get the complete list of users that have read access to the document.
138
-	 *
139
-	 * @since 16.0.0
140
-	 *
141
-	 * @return array
142
-	 */
143
-	public function getUsers(): array;
144
-
145
-
146
-	/**
147
-	 * Set the list of groups that have read access to the document.
148
-	 *
149
-	 * @since 16.0.0
150
-	 *
151
-	 * @param array $groups
152
-	 *
153
-	 * @return IDocumentAccess
154
-	 */
155
-	public function setGroups(array $groups): IDocumentAccess;
156
-
157
-	/**
158
-	 * Add an entry to the list of groups that have read access to the document.
159
-	 *
160
-	 * @since 16.0.0
161
-	 *
162
-	 * @param string $group
163
-	 *
164
-	 * @return IDocumentAccess
165
-	 */
166
-	public function addGroup(string $group): IDocumentAccess;
167
-
168
-	/**
169
-	 * Add multiple entries to the list of groups that have read access to the
170
-	 * document.
171
-	 *
172
-	 * @since 16.0.0
173
-	 *
174
-	 * @param array $groups
175
-	 *
176
-	 * @return IDocumentAccess
177
-	 */
178
-	public function addGroups(array $groups);
179
-
180
-	/**
181
-	 * Get the complete list of groups that have read access to the document.
182
-	 *
183
-	 * @since 16.0.0
184
-	 *
185
-	 * @return array
186
-	 */
187
-	public function getGroups(): array;
188
-
189
-
190
-	/**
191
-	 * Set the list of circles that have read access to the document.
192
-	 *
193
-	 * @since 16.0.0
194
-	 *
195
-	 * @param array $circles
196
-	 *
197
-	 * @return IDocumentAccess
198
-	 */
199
-	public function setCircles(array $circles): IDocumentAccess;
200
-
201
-	/**
202
-	 * Add an entry to the list of circles that have read access to the document.
203
-	 *
204
-	 * @since 16.0.0
205
-	 *
206
-	 * @param string $circle
207
-	 *
208
-	 * @return IDocumentAccess
209
-	 */
210
-	public function addCircle(string $circle): IDocumentAccess;
211
-
212
-	/**
213
-	 * Add multiple entries to the list of groups that have read access to the
214
-	 * document.
215
-	 *
216
-	 * @since 16.0.0
217
-	 *
218
-	 * @param array $circles
219
-	 *
220
-	 * @return IDocumentAccess
221
-	 */
222
-	public function addCircles(array $circles): IDocumentAccess;
223
-
224
-	/**
225
-	 * Get the complete list of circles that have read access to the document.
226
-	 *
227
-	 * @since 16.0.0
228
-	 *
229
-	 * @return array
230
-	 */
231
-	public function getCircles(): array;
232
-
233
-
234
-	/**
235
-	 * Set the list of links that have read access to the document.
236
-	 *
237
-	 * @since 16.0.0
238
-	 *
239
-	 * @param array $links
240
-	 *
241
-	 * @return IDocumentAccess
242
-	 */
243
-	public function setLinks(array $links): IDocumentAccess;
244
-
245
-	/**
246
-	 * Get the list of links that have read access to the document.
247
-	 *
248
-	 * @since 16.0.0
249
-	 *
250
-	 * @return array
251
-	 */
252
-	public function getLinks(): array;
48
+    /**
49
+     * Owner of the document can be set at the init of the object.
50
+     *
51
+     * @since 16.0.0
52
+     *
53
+     * IDocumentAccess constructor.
54
+     *
55
+     * @param string $ownerId
56
+     */
57
+    public function __construct(string $ownerId = '');
58
+
59
+
60
+    /**
61
+     * Set the Owner of the document.
62
+     *
63
+     * @since 16.0.0
64
+     *
65
+     * @param string $ownerId
66
+     *
67
+     * @return IDocumentAccess
68
+     */
69
+    public function setOwnerId(string $ownerId): IDocumentAccess;
70
+
71
+    /**
72
+     * Get the Owner of the document.
73
+     *
74
+     * @since 16.0.0
75
+     *
76
+     * @return string
77
+     */
78
+    public function getOwnerId(): string;
79
+
80
+
81
+    /**
82
+     * Set the viewer of the document.
83
+     *
84
+     * @since 16.0.0
85
+     *
86
+     * @param string $viewerId
87
+     *
88
+     * @return IDocumentAccess
89
+     */
90
+    public function setViewerId(string $viewerId): IDocumentAccess;
91
+
92
+    /**
93
+     * Get the viewer of the document.
94
+     *
95
+     * @since 16.0.0
96
+     *
97
+     * @return string
98
+     */
99
+    public function getViewerId(): string;
100
+
101
+
102
+    /**
103
+     * Set the list of users that have read access to the document.
104
+     *
105
+     * @since 16.0.0
106
+     *
107
+     * @param array $users
108
+     *
109
+     * @return IDocumentAccess
110
+     */
111
+    public function setUsers(array $users): IDocumentAccess;
112
+
113
+    /**
114
+     * Add an entry to the list of users that have read access to the document.
115
+     *
116
+     * @since 16.0.0
117
+     *
118
+     * @param string $user
119
+     *
120
+     * @return IDocumentAccess
121
+     */
122
+    public function addUser(string $user): IDocumentAccess;
123
+
124
+    /**
125
+     * Add multiple entries to the list of users that have read access to the
126
+     * document.
127
+     *
128
+     * @since 16.0.0
129
+     *
130
+     * @param array $users
131
+     *
132
+     * @return IDocumentAccess
133
+     */
134
+    public function addUsers($users): IDocumentAccess;
135
+
136
+    /**
137
+     * Get the complete list of users that have read access to the document.
138
+     *
139
+     * @since 16.0.0
140
+     *
141
+     * @return array
142
+     */
143
+    public function getUsers(): array;
144
+
145
+
146
+    /**
147
+     * Set the list of groups that have read access to the document.
148
+     *
149
+     * @since 16.0.0
150
+     *
151
+     * @param array $groups
152
+     *
153
+     * @return IDocumentAccess
154
+     */
155
+    public function setGroups(array $groups): IDocumentAccess;
156
+
157
+    /**
158
+     * Add an entry to the list of groups that have read access to the document.
159
+     *
160
+     * @since 16.0.0
161
+     *
162
+     * @param string $group
163
+     *
164
+     * @return IDocumentAccess
165
+     */
166
+    public function addGroup(string $group): IDocumentAccess;
167
+
168
+    /**
169
+     * Add multiple entries to the list of groups that have read access to the
170
+     * document.
171
+     *
172
+     * @since 16.0.0
173
+     *
174
+     * @param array $groups
175
+     *
176
+     * @return IDocumentAccess
177
+     */
178
+    public function addGroups(array $groups);
179
+
180
+    /**
181
+     * Get the complete list of groups that have read access to the document.
182
+     *
183
+     * @since 16.0.0
184
+     *
185
+     * @return array
186
+     */
187
+    public function getGroups(): array;
188
+
189
+
190
+    /**
191
+     * Set the list of circles that have read access to the document.
192
+     *
193
+     * @since 16.0.0
194
+     *
195
+     * @param array $circles
196
+     *
197
+     * @return IDocumentAccess
198
+     */
199
+    public function setCircles(array $circles): IDocumentAccess;
200
+
201
+    /**
202
+     * Add an entry to the list of circles that have read access to the document.
203
+     *
204
+     * @since 16.0.0
205
+     *
206
+     * @param string $circle
207
+     *
208
+     * @return IDocumentAccess
209
+     */
210
+    public function addCircle(string $circle): IDocumentAccess;
211
+
212
+    /**
213
+     * Add multiple entries to the list of groups that have read access to the
214
+     * document.
215
+     *
216
+     * @since 16.0.0
217
+     *
218
+     * @param array $circles
219
+     *
220
+     * @return IDocumentAccess
221
+     */
222
+    public function addCircles(array $circles): IDocumentAccess;
223
+
224
+    /**
225
+     * Get the complete list of circles that have read access to the document.
226
+     *
227
+     * @since 16.0.0
228
+     *
229
+     * @return array
230
+     */
231
+    public function getCircles(): array;
232
+
233
+
234
+    /**
235
+     * Set the list of links that have read access to the document.
236
+     *
237
+     * @since 16.0.0
238
+     *
239
+     * @param array $links
240
+     *
241
+     * @return IDocumentAccess
242
+     */
243
+    public function setLinks(array $links): IDocumentAccess;
244
+
245
+    /**
246
+     * Get the list of links that have read access to the document.
247
+     *
248
+     * @since 16.0.0
249
+     *
250
+     * @return array
251
+     */
252
+    public function getLinks(): array;
253 253
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/IFullTextSearchPlatform.php 1 patch
Indentation   +141 added lines, -141 removed lines patch added patch discarded remove patch
@@ -70,145 +70,145 @@
 block discarded – undo
70 70
  *
71 71
  */
72 72
 interface IFullTextSearchPlatform {
73
-	/**
74
-	 * Must returns a unique Id used to identify the Search Platform.
75
-	 * Id must contains only alphanumeric chars, with no space.
76
-	 *
77
-	 * @since 15.0.0
78
-	 *
79
-	 * @return string
80
-	 */
81
-	public function getId(): string;
82
-
83
-
84
-	/**
85
-	 * Must returns a descriptive name of the Search Platform.
86
-	 * This is used mainly in the admin settings page to display the list of
87
-	 * available Search Platform
88
-	 *
89
-	 * @since 15.0.0
90
-	 *
91
-	 * @return string
92
-	 */
93
-	public function getName(): string;
94
-
95
-
96
-	/**
97
-	 * should returns the current configuration of the Search Platform.
98
-	 * This is used to display the configuration when using the
99
-	 * ./occ fulltextsearch:check command line.
100
-	 *
101
-	 * @since 15.0.0
102
-	 *
103
-	 * @return array
104
-	 */
105
-	public function getConfiguration(): array;
106
-
107
-
108
-	/**
109
-	 * Set the wrapper of the currently executed process.
110
-	 * Because the index process can be long and heavy, and because errors can
111
-	 * be encountered during the process, the IRunner is a wrapper that allow the
112
-	 * Search Platform to communicate with the process initiated by
113
-	 * FullTextSearch.
114
-	 *
115
-	 * The IRunner is coming with some methods so the Search Platform can
116
-	 * returns important information and errors to be displayed to the admin.
117
-	 *
118
-	 * @since 15.0.0
119
-	 *
120
-	 * @param IRunner $runner
121
-	 */
122
-	public function setRunner(IRunner $runner);
123
-
124
-
125
-	/**
126
-	 * Called when FullTextSearch is loading your Search Platform.
127
-	 *
128
-	 * @since 15.0.0
129
-	 */
130
-	public function loadPlatform();
131
-
132
-
133
-	/**
134
-	 * Called to check that your Search Platform is correctly configured and that
135
-	 * This is also the right place to check that the Search Service is available.
136
-	 *
137
-	 * @since 15.0.0
138
-	 *
139
-	 * @return bool
140
-	 */
141
-	public function testPlatform(): bool;
142
-
143
-
144
-	/**
145
-	 * Called before an index is initiated.
146
-	 * Best place to initiate some stuff on the Search Server (mapping, ...)
147
-	 *
148
-	 * @since 15.0.0
149
-	 */
150
-	public function initializeIndex();
151
-
152
-
153
-	/**
154
-	 * Reset the indexes for a specific providerId.
155
-	 * $providerId can be 'all' if it is a global reset.
156
-	 *
157
-	 * @since 15.0.0
158
-	 *
159
-	 * @param string $providerId
160
-	 */
161
-	public function resetIndex(string $providerId);
162
-
163
-
164
-	/**
165
-	 * Deleting some IIndex, sent in an array
166
-	 *
167
-	 * @see IIndex
168
-	 *
169
-	 * @since 15.0.0
170
-	 *
171
-	 * @param IIndex[] $indexes
172
-	 */
173
-	public function deleteIndexes(array $indexes);
174
-
175
-
176
-	/**
177
-	 * Indexing a document.
178
-	 *
179
-	 * @see IndexDocument
180
-	 *
181
-	 * @since 15.0.0
182
-	 *
183
-	 * @param IIndexDocument $document
184
-	 *
185
-	 * @return IIndex
186
-	 */
187
-	public function indexDocument(IIndexDocument $document): IIndex;
188
-
189
-
190
-	/**
191
-	 * Searching documents, ISearchResult should be updated with the result of
192
-	 * the search.
193
-	 *
194
-	 * @since 15.0.0
195
-	 *
196
-	 * @param ISearchResult $result
197
-	 * @param IDocumentAccess $access
198
-	 */
199
-	public function searchRequest(ISearchResult $result, IDocumentAccess $access);
200
-
201
-
202
-	/**
203
-	 * Return a document based on its Id and the Provider.
204
-	 * This is used when an admin execute ./occ fulltextsearch:document:platform
205
-	 *
206
-	 * @since 15.0.0
207
-	 *
208
-	 * @param string $providerId
209
-	 * @param string $documentId
210
-	 *
211
-	 * @return IIndexDocument
212
-	 */
213
-	public function getDocument(string $providerId, string $documentId): IIndexDocument;
73
+    /**
74
+     * Must returns a unique Id used to identify the Search Platform.
75
+     * Id must contains only alphanumeric chars, with no space.
76
+     *
77
+     * @since 15.0.0
78
+     *
79
+     * @return string
80
+     */
81
+    public function getId(): string;
82
+
83
+
84
+    /**
85
+     * Must returns a descriptive name of the Search Platform.
86
+     * This is used mainly in the admin settings page to display the list of
87
+     * available Search Platform
88
+     *
89
+     * @since 15.0.0
90
+     *
91
+     * @return string
92
+     */
93
+    public function getName(): string;
94
+
95
+
96
+    /**
97
+     * should returns the current configuration of the Search Platform.
98
+     * This is used to display the configuration when using the
99
+     * ./occ fulltextsearch:check command line.
100
+     *
101
+     * @since 15.0.0
102
+     *
103
+     * @return array
104
+     */
105
+    public function getConfiguration(): array;
106
+
107
+
108
+    /**
109
+     * Set the wrapper of the currently executed process.
110
+     * Because the index process can be long and heavy, and because errors can
111
+     * be encountered during the process, the IRunner is a wrapper that allow the
112
+     * Search Platform to communicate with the process initiated by
113
+     * FullTextSearch.
114
+     *
115
+     * The IRunner is coming with some methods so the Search Platform can
116
+     * returns important information and errors to be displayed to the admin.
117
+     *
118
+     * @since 15.0.0
119
+     *
120
+     * @param IRunner $runner
121
+     */
122
+    public function setRunner(IRunner $runner);
123
+
124
+
125
+    /**
126
+     * Called when FullTextSearch is loading your Search Platform.
127
+     *
128
+     * @since 15.0.0
129
+     */
130
+    public function loadPlatform();
131
+
132
+
133
+    /**
134
+     * Called to check that your Search Platform is correctly configured and that
135
+     * This is also the right place to check that the Search Service is available.
136
+     *
137
+     * @since 15.0.0
138
+     *
139
+     * @return bool
140
+     */
141
+    public function testPlatform(): bool;
142
+
143
+
144
+    /**
145
+     * Called before an index is initiated.
146
+     * Best place to initiate some stuff on the Search Server (mapping, ...)
147
+     *
148
+     * @since 15.0.0
149
+     */
150
+    public function initializeIndex();
151
+
152
+
153
+    /**
154
+     * Reset the indexes for a specific providerId.
155
+     * $providerId can be 'all' if it is a global reset.
156
+     *
157
+     * @since 15.0.0
158
+     *
159
+     * @param string $providerId
160
+     */
161
+    public function resetIndex(string $providerId);
162
+
163
+
164
+    /**
165
+     * Deleting some IIndex, sent in an array
166
+     *
167
+     * @see IIndex
168
+     *
169
+     * @since 15.0.0
170
+     *
171
+     * @param IIndex[] $indexes
172
+     */
173
+    public function deleteIndexes(array $indexes);
174
+
175
+
176
+    /**
177
+     * Indexing a document.
178
+     *
179
+     * @see IndexDocument
180
+     *
181
+     * @since 15.0.0
182
+     *
183
+     * @param IIndexDocument $document
184
+     *
185
+     * @return IIndex
186
+     */
187
+    public function indexDocument(IIndexDocument $document): IIndex;
188
+
189
+
190
+    /**
191
+     * Searching documents, ISearchResult should be updated with the result of
192
+     * the search.
193
+     *
194
+     * @since 15.0.0
195
+     *
196
+     * @param ISearchResult $result
197
+     * @param IDocumentAccess $access
198
+     */
199
+    public function searchRequest(ISearchResult $result, IDocumentAccess $access);
200
+
201
+
202
+    /**
203
+     * Return a document based on its Id and the Provider.
204
+     * This is used when an admin execute ./occ fulltextsearch:document:platform
205
+     *
206
+     * @since 15.0.0
207
+     *
208
+     * @param string $providerId
209
+     * @param string $documentId
210
+     *
211
+     * @return IIndexDocument
212
+     */
213
+    public function getDocument(string $providerId, string $documentId): IIndexDocument;
214 214
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/IFullTextSearchManager.php 1 patch
Indentation   +139 added lines, -139 removed lines patch added patch discarded remove patch
@@ -41,143 +41,143 @@
 block discarded – undo
41 41
  *
42 42
  */
43 43
 interface IFullTextSearchManager {
44
-	/**
45
-	 * Register a IProviderService.
46
-	 *
47
-	 * @since 15.0.0
48
-	 *
49
-	 * @param IProviderService $providerService
50
-	 */
51
-	public function registerProviderService(IProviderService $providerService);
52
-
53
-	/**
54
-	 * Register a IIndexService.
55
-	 *
56
-	 * @since 15.0.0
57
-	 *
58
-	 * @param IIndexService $indexService
59
-	 */
60
-	public function registerIndexService(IIndexService $indexService);
61
-
62
-	/**
63
-	 * Register a ISearchService.
64
-	 *
65
-	 * @since 15.0.0
66
-	 *
67
-	 * @param ISearchService $searchService
68
-	 */
69
-	public function registerSearchService(ISearchService $searchService);
70
-
71
-	/**
72
-	 * returns true is Full Text Search is available (app is present and Service
73
-	 * are registered)
74
-	 *
75
-	 * @since 16.0.0
76
-	 *
77
-	 * @return bool
78
-	 */
79
-	public function isAvailable(): bool;
80
-
81
-
82
-	/**
83
-	 * Add the Javascript API in the navigation page of an app.
84
-	 * Needed to replace the default search.
85
-	 *
86
-	 * @since 15.0.0
87
-	 */
88
-	public function addJavascriptAPI();
89
-
90
-
91
-	/**
92
-	 * Check if the provider $providerId is already indexed.
93
-	 *
94
-	 * @since 15.0.0
95
-	 *
96
-	 * @param string $providerId
97
-	 *
98
-	 * @return bool
99
-	 */
100
-	public function isProviderIndexed(string $providerId): bool;
101
-
102
-
103
-	/**
104
-	 * Retrieve an Index from the database, based on the Id of the Provider
105
-	 * and the Id of the Document
106
-	 *
107
-	 * @since 15.0.0
108
-	 *
109
-	 * @param string $providerId
110
-	 * @param string $documentId
111
-	 *
112
-	 * @return IIndex
113
-	 */
114
-	public function getIndex(string $providerId, string $documentId): IIndex;
115
-
116
-
117
-	/**
118
-	 * Create a new Index.
119
-	 *
120
-	 * This method must be called when a new document is created.
121
-	 *
122
-	 * @since 15.0.0
123
-	 *
124
-	 * @param string $providerId
125
-	 * @param string $documentId
126
-	 * @param string $userId
127
-	 * @param int $status
128
-	 *
129
-	 * @return IIndex
130
-	 */
131
-	public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex;
132
-
133
-
134
-	/**
135
-	 * Update the status of an Index. status is a bitflag, setting $reset to
136
-	 * true will reset the status to the value defined in the parameter.
137
-	 *
138
-	 * @since 15.0.0
139
-	 *
140
-	 * @param string $providerId
141
-	 * @param string $documentId
142
-	 * @param int $status
143
-	 * @param bool $reset
144
-	 */
145
-	public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false);
146
-
147
-
148
-	/**
149
-	 * Update the status of an array of Index. status is a bit flag, setting $reset to
150
-	 * true will reset the status to the value defined in the parameter.
151
-	 *
152
-	 * @since 15.0.0
153
-	 *
154
-	 * @param string $providerId
155
-	 * @param array $documentIds
156
-	 * @param int $status
157
-	 * @param bool $reset
158
-	 */
159
-	public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false);
160
-
161
-	/**
162
-	 * Update an array of Index.
163
-	 *
164
-	 * @since 15.0.0
165
-	 *
166
-	 * @param IIndex[] $indexes
167
-	 */
168
-	public function updateIndexes(array $indexes);
169
-
170
-	/**
171
-	 * Search using an array as request. If $userId is empty, will use the
172
-	 * current session.
173
-	 *
174
-	 * @see ISearchService::generateSearchRequest
175
-	 *
176
-	 * @since 15.0.0
177
-	 *
178
-	 * @param array $request
179
-	 * @param string $userId
180
-	 * @return ISearchResult[]
181
-	 */
182
-	public function search(array $request, string $userId = ''): array;
44
+    /**
45
+     * Register a IProviderService.
46
+     *
47
+     * @since 15.0.0
48
+     *
49
+     * @param IProviderService $providerService
50
+     */
51
+    public function registerProviderService(IProviderService $providerService);
52
+
53
+    /**
54
+     * Register a IIndexService.
55
+     *
56
+     * @since 15.0.0
57
+     *
58
+     * @param IIndexService $indexService
59
+     */
60
+    public function registerIndexService(IIndexService $indexService);
61
+
62
+    /**
63
+     * Register a ISearchService.
64
+     *
65
+     * @since 15.0.0
66
+     *
67
+     * @param ISearchService $searchService
68
+     */
69
+    public function registerSearchService(ISearchService $searchService);
70
+
71
+    /**
72
+     * returns true is Full Text Search is available (app is present and Service
73
+     * are registered)
74
+     *
75
+     * @since 16.0.0
76
+     *
77
+     * @return bool
78
+     */
79
+    public function isAvailable(): bool;
80
+
81
+
82
+    /**
83
+     * Add the Javascript API in the navigation page of an app.
84
+     * Needed to replace the default search.
85
+     *
86
+     * @since 15.0.0
87
+     */
88
+    public function addJavascriptAPI();
89
+
90
+
91
+    /**
92
+     * Check if the provider $providerId is already indexed.
93
+     *
94
+     * @since 15.0.0
95
+     *
96
+     * @param string $providerId
97
+     *
98
+     * @return bool
99
+     */
100
+    public function isProviderIndexed(string $providerId): bool;
101
+
102
+
103
+    /**
104
+     * Retrieve an Index from the database, based on the Id of the Provider
105
+     * and the Id of the Document
106
+     *
107
+     * @since 15.0.0
108
+     *
109
+     * @param string $providerId
110
+     * @param string $documentId
111
+     *
112
+     * @return IIndex
113
+     */
114
+    public function getIndex(string $providerId, string $documentId): IIndex;
115
+
116
+
117
+    /**
118
+     * Create a new Index.
119
+     *
120
+     * This method must be called when a new document is created.
121
+     *
122
+     * @since 15.0.0
123
+     *
124
+     * @param string $providerId
125
+     * @param string $documentId
126
+     * @param string $userId
127
+     * @param int $status
128
+     *
129
+     * @return IIndex
130
+     */
131
+    public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex;
132
+
133
+
134
+    /**
135
+     * Update the status of an Index. status is a bitflag, setting $reset to
136
+     * true will reset the status to the value defined in the parameter.
137
+     *
138
+     * @since 15.0.0
139
+     *
140
+     * @param string $providerId
141
+     * @param string $documentId
142
+     * @param int $status
143
+     * @param bool $reset
144
+     */
145
+    public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false);
146
+
147
+
148
+    /**
149
+     * Update the status of an array of Index. status is a bit flag, setting $reset to
150
+     * true will reset the status to the value defined in the parameter.
151
+     *
152
+     * @since 15.0.0
153
+     *
154
+     * @param string $providerId
155
+     * @param array $documentIds
156
+     * @param int $status
157
+     * @param bool $reset
158
+     */
159
+    public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false);
160
+
161
+    /**
162
+     * Update an array of Index.
163
+     *
164
+     * @since 15.0.0
165
+     *
166
+     * @param IIndex[] $indexes
167
+     */
168
+    public function updateIndexes(array $indexes);
169
+
170
+    /**
171
+     * Search using an array as request. If $userId is empty, will use the
172
+     * current session.
173
+     *
174
+     * @see ISearchService::generateSearchRequest
175
+     *
176
+     * @since 15.0.0
177
+     *
178
+     * @param array $request
179
+     * @param string $userId
180
+     * @return ISearchResult[]
181
+     */
182
+    public function search(array $request, string $userId = ''): array;
183 183
 }
Please login to merge, or discard this patch.
lib/public/Files/Events/BeforeFolderScannedEvent.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -31,24 +31,24 @@
 block discarded – undo
31 31
  * @since 18.0.0
32 32
  */
33 33
 class BeforeFolderScannedEvent extends Event {
34
-	/** @var string */
35
-	private $absolutePath;
34
+    /** @var string */
35
+    private $absolutePath;
36 36
 
37
-	/**
38
-	 * @param string $absolutePath
39
-	 *
40
-	 * @since 18.0.0
41
-	 */
42
-	public function __construct(string $absolutePath) {
43
-		parent::__construct();
44
-		$this->absolutePath = $absolutePath;
45
-	}
37
+    /**
38
+     * @param string $absolutePath
39
+     *
40
+     * @since 18.0.0
41
+     */
42
+    public function __construct(string $absolutePath) {
43
+        parent::__construct();
44
+        $this->absolutePath = $absolutePath;
45
+    }
46 46
 
47
-	/**
48
-	 * @return string
49
-	 * @since 18.0.0
50
-	 */
51
-	public function getAbsolutePath(): string {
52
-		return $this->absolutePath;
53
-	}
47
+    /**
48
+     * @return string
49
+     * @since 18.0.0
50
+     */
51
+    public function getAbsolutePath(): string {
52
+        return $this->absolutePath;
53
+    }
54 54
 }
Please login to merge, or discard this patch.
lib/public/Files/Events/BeforeFileScannedEvent.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -31,24 +31,24 @@
 block discarded – undo
31 31
  * @since 18.0.0
32 32
  */
33 33
 class BeforeFileScannedEvent extends Event {
34
-	/** @var string */
35
-	private $absolutePath;
34
+    /** @var string */
35
+    private $absolutePath;
36 36
 
37
-	/**
38
-	 * @param string $absolutePath
39
-	 *
40
-	 * @since 18.0.0
41
-	 */
42
-	public function __construct(string $absolutePath) {
43
-		parent::__construct();
44
-		$this->absolutePath = $absolutePath;
45
-	}
37
+    /**
38
+     * @param string $absolutePath
39
+     *
40
+     * @since 18.0.0
41
+     */
42
+    public function __construct(string $absolutePath) {
43
+        parent::__construct();
44
+        $this->absolutePath = $absolutePath;
45
+    }
46 46
 
47
-	/**
48
-	 * @return string
49
-	 * @since 18.0.0
50
-	 */
51
-	public function getAbsolutePath(): string {
52
-		return $this->absolutePath;
53
-	}
47
+    /**
48
+     * @return string
49
+     * @since 18.0.0
50
+     */
51
+    public function getAbsolutePath(): string {
52
+        return $this->absolutePath;
53
+    }
54 54
 }
Please login to merge, or discard this patch.
lib/public/Files/Events/FileScannedEvent.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -31,24 +31,24 @@
 block discarded – undo
31 31
  * @since 18.0.0
32 32
  */
33 33
 class FileScannedEvent extends Event {
34
-	/** @var string */
35
-	private $absolutePath;
34
+    /** @var string */
35
+    private $absolutePath;
36 36
 
37
-	/**
38
-	 * @param string $absolutePath
39
-	 *
40
-	 * @since 18.0.0
41
-	 */
42
-	public function __construct(string $absolutePath) {
43
-		parent::__construct();
44
-		$this->absolutePath = $absolutePath;
45
-	}
37
+    /**
38
+     * @param string $absolutePath
39
+     *
40
+     * @since 18.0.0
41
+     */
42
+    public function __construct(string $absolutePath) {
43
+        parent::__construct();
44
+        $this->absolutePath = $absolutePath;
45
+    }
46 46
 
47
-	/**
48
-	 * @return string
49
-	 * @since 18.0.0
50
-	 */
51
-	public function getAbsolutePath(): string {
52
-		return $this->absolutePath;
53
-	}
47
+    /**
48
+     * @return string
49
+     * @since 18.0.0
50
+     */
51
+    public function getAbsolutePath(): string {
52
+        return $this->absolutePath;
53
+    }
54 54
 }
Please login to merge, or discard this patch.
lib/public/Files/Events/FolderScannedEvent.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -31,24 +31,24 @@
 block discarded – undo
31 31
  * @since 18.0.0
32 32
  */
33 33
 class FolderScannedEvent extends Event {
34
-	/** @var string */
35
-	private $absolutePath;
34
+    /** @var string */
35
+    private $absolutePath;
36 36
 
37
-	/**
38
-	 * @param string $absolutePath
39
-	 *
40
-	 * @since 18.0.0
41
-	 */
42
-	public function __construct(string $absolutePath) {
43
-		parent::__construct();
44
-		$this->absolutePath = $absolutePath;
45
-	}
37
+    /**
38
+     * @param string $absolutePath
39
+     *
40
+     * @since 18.0.0
41
+     */
42
+    public function __construct(string $absolutePath) {
43
+        parent::__construct();
44
+        $this->absolutePath = $absolutePath;
45
+    }
46 46
 
47
-	/**
48
-	 * @return string
49
-	 * @since 18.0.0
50
-	 */
51
-	public function getAbsolutePath(): string {
52
-		return $this->absolutePath;
53
-	}
47
+    /**
48
+     * @return string
49
+     * @since 18.0.0
50
+     */
51
+    public function getAbsolutePath(): string {
52
+        return $this->absolutePath;
53
+    }
54 54
 }
Please login to merge, or discard this patch.
lib/public/Files/Lock/ILock.php 1 patch
Indentation   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -30,133 +30,133 @@
 block discarded – undo
30 30
  * @since 24.0.0
31 31
  */
32 32
 interface ILock {
33
-	/**
34
-	 * User owned manual lock
35
-	 *
36
-	 * This lock type is initiated by a user manually through the web UI or clients
37
-	 * and will limit editing capabilities on the file to the lock owning user.
38
-	 *
39
-	 * @since 24.0.0
40
-	 */
41
-	public const TYPE_USER = 0;
42
-
43
-	/**
44
-	 * App owned lock
45
-	 *
46
-	 * This lock type is created by collaborative apps like Text or Office to avoid
47
-	 * outside changes through WevDAV or other apps.
48
-	 * @since 24.0.0
49
-	 *
50
-	 */
51
-	public const TYPE_APP = 1;
52
-
53
-	/**
54
-	 * Token owned lock
55
-	 *
56
-	 * This lock type will bind the ownership to the provided lock token. Any request
57
-	 * that aims to modify the file will be required to sent the token, the user
58
-	 * itself is not able to write to files without the token. This will allow
59
-	 * to limit the locking to an individual client.
60
-	 *
61
-	 * @since 24.0.0
62
-	 */
63
-	public const TYPE_TOKEN = 2;
64
-
65
-	/**
66
-	 * WebDAV Lock scope exclusive
67
-	 *
68
-	 * @since 24.0.0
69
-	 */
70
-	public const LOCK_EXCLUSIVE = 1;
71
-
72
-	/**
73
-	 * WebDAV Lock scope shared
74
-	 *
75
-	 * @since 24.0.0
76
-	 */
77
-	public const LOCK_SHARED = 2;
78
-
79
-	/**
80
-	 * Lock only the resource the lock is applied to
81
-	 *
82
-	 * @since 24.0.0
83
-	 */
84
-	public const LOCK_DEPTH_ZERO = 0;
85
-
86
-	/**
87
-	 * Lock app resources under the locked one with infinite depth
88
-	 *
89
-	 * @since 24.0.0
90
-	 */
91
-	public const LOCK_DEPTH_INFINITE = -1;
92
-
93
-	/**
94
-	 * Type of the lock
95
-	 *
96
-	 * @psalm-return ILock::TYPE_*
97
-	 * @since 24.0.0
98
-	 */
99
-	public function getType(): int;
100
-
101
-	/**
102
-	 * Owner that holds the lock
103
-	 *
104
-	 * Depending on the lock type this is:
105
-	 * - ILock::TYPE_USER: A user id
106
-	 * - ILock::TYPE_APP: An app id
107
-	 * - ILock::TYPE_TOKEN: A user id
108
-	 *
109
-	 * @since 24.0.0
110
-	 */
111
-	public function getOwner(): string;
112
-
113
-	/**
114
-	 * File id that the lock is holding
115
-	 *
116
-	 * @since 24.0.0
117
-	 */
118
-	public function getFileId(): int;
119
-
120
-	/**
121
-	 * Timeout of the lock in seconds starting from the created at time
122
-	 *
123
-	 * @since 24.0.0
124
-	 */
125
-	public function getTimeout(): int;
126
-
127
-	/**
128
-	 * Unix timestamp of the lock creation time
129
-	 *
130
-	 * @since 24.0.0
131
-	 */
132
-	public function getCreatedAt(): int;
133
-
134
-	/**
135
-	 * Token string as a unique identifier for the lock, usually a UUID
136
-	 *
137
-	 * @since 24.0.0
138
-	 */
139
-	public function getToken(): string;
140
-
141
-	/**
142
-	 * Lock depth to apply the lock to child resources
143
-	 *
144
-	 * @since 24.0.0
145
-	 */
146
-	public function getDepth(): int;
147
-
148
-	/**
149
-	 * WebDAV lock scope
150
-	 *
151
-	 * @since 24.0.0
152
-	 * @psalm-return ILock::LOCK_EXCLUSIVE|ILock::LOCK_SHARED
153
-	 */
154
-	public function getScope(): int;
155
-
156
-	/**
157
-	 * String representation of the lock to identify it through logging
158
-	 *
159
-	 * @since 24.0.0
160
-	 */
161
-	public function __toString(): string;
33
+    /**
34
+     * User owned manual lock
35
+     *
36
+     * This lock type is initiated by a user manually through the web UI or clients
37
+     * and will limit editing capabilities on the file to the lock owning user.
38
+     *
39
+     * @since 24.0.0
40
+     */
41
+    public const TYPE_USER = 0;
42
+
43
+    /**
44
+     * App owned lock
45
+     *
46
+     * This lock type is created by collaborative apps like Text or Office to avoid
47
+     * outside changes through WevDAV or other apps.
48
+     * @since 24.0.0
49
+     *
50
+     */
51
+    public const TYPE_APP = 1;
52
+
53
+    /**
54
+     * Token owned lock
55
+     *
56
+     * This lock type will bind the ownership to the provided lock token. Any request
57
+     * that aims to modify the file will be required to sent the token, the user
58
+     * itself is not able to write to files without the token. This will allow
59
+     * to limit the locking to an individual client.
60
+     *
61
+     * @since 24.0.0
62
+     */
63
+    public const TYPE_TOKEN = 2;
64
+
65
+    /**
66
+     * WebDAV Lock scope exclusive
67
+     *
68
+     * @since 24.0.0
69
+     */
70
+    public const LOCK_EXCLUSIVE = 1;
71
+
72
+    /**
73
+     * WebDAV Lock scope shared
74
+     *
75
+     * @since 24.0.0
76
+     */
77
+    public const LOCK_SHARED = 2;
78
+
79
+    /**
80
+     * Lock only the resource the lock is applied to
81
+     *
82
+     * @since 24.0.0
83
+     */
84
+    public const LOCK_DEPTH_ZERO = 0;
85
+
86
+    /**
87
+     * Lock app resources under the locked one with infinite depth
88
+     *
89
+     * @since 24.0.0
90
+     */
91
+    public const LOCK_DEPTH_INFINITE = -1;
92
+
93
+    /**
94
+     * Type of the lock
95
+     *
96
+     * @psalm-return ILock::TYPE_*
97
+     * @since 24.0.0
98
+     */
99
+    public function getType(): int;
100
+
101
+    /**
102
+     * Owner that holds the lock
103
+     *
104
+     * Depending on the lock type this is:
105
+     * - ILock::TYPE_USER: A user id
106
+     * - ILock::TYPE_APP: An app id
107
+     * - ILock::TYPE_TOKEN: A user id
108
+     *
109
+     * @since 24.0.0
110
+     */
111
+    public function getOwner(): string;
112
+
113
+    /**
114
+     * File id that the lock is holding
115
+     *
116
+     * @since 24.0.0
117
+     */
118
+    public function getFileId(): int;
119
+
120
+    /**
121
+     * Timeout of the lock in seconds starting from the created at time
122
+     *
123
+     * @since 24.0.0
124
+     */
125
+    public function getTimeout(): int;
126
+
127
+    /**
128
+     * Unix timestamp of the lock creation time
129
+     *
130
+     * @since 24.0.0
131
+     */
132
+    public function getCreatedAt(): int;
133
+
134
+    /**
135
+     * Token string as a unique identifier for the lock, usually a UUID
136
+     *
137
+     * @since 24.0.0
138
+     */
139
+    public function getToken(): string;
140
+
141
+    /**
142
+     * Lock depth to apply the lock to child resources
143
+     *
144
+     * @since 24.0.0
145
+     */
146
+    public function getDepth(): int;
147
+
148
+    /**
149
+     * WebDAV lock scope
150
+     *
151
+     * @since 24.0.0
152
+     * @psalm-return ILock::LOCK_EXCLUSIVE|ILock::LOCK_SHARED
153
+     */
154
+    public function getScope(): int;
155
+
156
+    /**
157
+     * String representation of the lock to identify it through logging
158
+     *
159
+     * @since 24.0.0
160
+     */
161
+    public function __toString(): string;
162 162
 }
Please login to merge, or discard this patch.
lib/public/Files/Lock/ILockProvider.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -32,26 +32,26 @@
 block discarded – undo
32 32
  * @since 24.0.0
33 33
  */
34 34
 interface ILockProvider {
35
-	/**
36
-	 * @throws PreConditionNotMetException
37
-	 * @throws NoLockProviderException
38
-	 * @psalm-return list<ILock>
39
-	 * @since 24.0.0
40
-	 */
41
-	public function getLocks(int $fileId): array;
35
+    /**
36
+     * @throws PreConditionNotMetException
37
+     * @throws NoLockProviderException
38
+     * @psalm-return list<ILock>
39
+     * @since 24.0.0
40
+     */
41
+    public function getLocks(int $fileId): array;
42 42
 
43
-	/**
44
-	 * @throws PreConditionNotMetException
45
-	 * @throws OwnerLockedException
46
-	 * @throws NoLockProviderException
47
-	 * @since 24.0.0
48
-	 */
49
-	public function lock(LockContext $lockInfo): ILock;
43
+    /**
44
+     * @throws PreConditionNotMetException
45
+     * @throws OwnerLockedException
46
+     * @throws NoLockProviderException
47
+     * @since 24.0.0
48
+     */
49
+    public function lock(LockContext $lockInfo): ILock;
50 50
 
51
-	/**
52
-	 * @throws PreConditionNotMetException
53
-	 * @throws NoLockProviderException
54
-	 * @since 24.0.0
55
-	 */
56
-	public function unlock(LockContext $lockInfo): void;
51
+    /**
52
+     * @throws PreConditionNotMetException
53
+     * @throws NoLockProviderException
54
+     * @since 24.0.0
55
+     */
56
+    public function unlock(LockContext $lockInfo): void;
57 57
 }
Please login to merge, or discard this patch.