archivesInterface.php 13.8 KB
Newer Older
Prosper De Laure's avatar
Prosper De Laure committed
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
<?php

/*
 * Copyright (C) 2015 Maarch
 *
 * This file is part of bundle recordsManagement.
 *
 * Bundle recordsManagement is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Bundle recordsManagement 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with bundle recordsManagement.  If not, see <http://www.gnu.org/licenses/>.
 */
namespace bundle\recordsManagement;

/**
 * Interface for management of archives
 *
 * @package Recordsmanagement
 */
interface archivesInterface
{
    /*
        RETRIEVE ARCHIVES
    */
    /**
     * Search archives by profile / dates / agreement
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
     * @param string  $archiveId
     * @param string  $profileReference
     * @param string  $status
     * @param string  $archiveName
     * @param string  $agreementReference
     * @param string  $archiveExpired
     * @param string  $finalDisposition
     * @param string  $originatorOrgRegNumber
     * @param string  $originatorOwnerOrgId
     * @param string  $originatorArchiveId
     * @param array   $originatingDate
     * @param string  $filePlanPosition
     * @param bool    $hasParent
     * @param string  $description
     * @param string  $text
     * @param bool    $partialRetentionRule
     * @param string  $retentionRuleCode
     * @param string  $depositStartDate
     * @param string  $depositEndDate
     * @param string  $originatingStartDate
     * @param string  $originatingEndDate
     * @param string  $archiverArchiveId
     * @param integer $maxResults
Prosper De Laure's avatar
Prosper De Laure committed
58
59
60
61
     *
     * @action recordsManagement/archive/search
     *
     */
62
    public function read(
63
64
65
66
67
68
69
        $archiveId = null,
        $profileReference = null,
        $status = null,
        $archiveName = null,
        $agreementReference = null,
        $archiveExpired = null,
        $finalDisposition = null,
70
        $originatorOrgRegNumber = null,
Dylan's avatar
Dylan committed
71
        $originatorOwnerOrgId = null,
72
73
        $originatorArchiveId = null,
        $originatingDate = null,
74
        $filePlanPosition = null,
Cyril Vazquez's avatar
Cyril Vazquez committed
75
        $hasParent = null,
76
        $description = null,
77
        $text = null,
78
        $partialRetentionRule = null,
79
        $retentionRuleCode = null,
80
81
82
        $depositStartDate = null,
        $depositEndDate = null,
        $originatingStartDate = null,
83
        $originatingEndDate = null,
84
85
        $archiverArchiveId = null,
        $maxResults = null
86
    );
Prosper De Laure's avatar
Prosper De Laure committed
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
    /**
     * Count archives by profile / dates / agreement
     *
     * @param string  $archiveId
     * @param string  $profileReference
     * @param string  $status
     * @param string  $archiveName
     * @param string  $agreementReference
     * @param string  $archiveExpired
     * @param string  $finalDisposition
     * @param string  $originatorOrgRegNumber
     * @param string  $originatorOwnerOrgId
     * @param string  $originatorArchiveId
     * @param array   $originatingDate
     * @param string  $filePlanPosition
     * @param bool    $hasParent
     * @param string  $description
     * @param string  $text
     * @param bool    $partialRetentionRule
     * @param string  $retentionRuleCode
     * @param string  $depositStartDate
     * @param string  $depositEndDate
     * @param string  $originatingStartDate
     * @param string  $originatingEndDate
     * @param string  $archiverArchiveId
     * @param integer $maxResults
     *
     * @action recordsManagement/archive/count
     *
     */
    public function readCount(
        $archiveId = null,
        $profileReference = null,
        $status = null,
        $archiveName = null,
        $agreementReference = null,
        $archiveExpired = null,
        $finalDisposition = null,
        $originatorOrgRegNumber = null,
        $originatorOwnerOrgId = null,
        $originatorArchiveId = null,
        $originatingDate = null,
        $filePlanPosition = null,
        $hasParent = null,
        $description = null,
        $text = null,
        $partialRetentionRule = null,
        $retentionRuleCode = null,
        $depositStartDate = null,
        $depositEndDate = null,
        $originatingStartDate = null,
        $originatingEndDate = null,
        $archiverArchiveId = null,
        $maxResults = null
    );

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
    /**
     * Search archives by profile / dates / agreement
     * @param string $archiveId
     * @param string $profileReference
     * @param string $status
     * @param string $archiveName
     * @param string $agreementReference
     * @param string $archiveExpired
     * @param string $finalDisposition
     * @param string $originatorOrgRegNumber
     * @param string $originatorOwnerOrgId
     * @param string $originatorArchiveId
     * @param array  $originatingDate
     * @param string $filePlanPosition
     * @param bool   $hasParent
     * @param string $description
     * @param string $text
     * @param bool   $partialRetentionRule
     * @param string $retentionRuleCode
     * @param string $depositStartDate
     * @param string $depositEndDate
     * @param string $originatingStartDate
     * @param string $originatingEndDate
     *
     * @action recordsManagement/archive/searchRegistry
     *
     */
    public function readRegistry(
        $archiveId = null,
        $profileReference = null,
        $status = null,
        $archiveName = null,
        $agreementReference = null,
        $archiveExpired = null,
        $finalDisposition = null,
        $originatorOrgRegNumber = null,
        $originatorOwnerOrgId = null,
        $originatorArchiveId = null,
        $originatingDate = null,
        $filePlanPosition = null,
        $hasParent = null,
        $description = null,
        $text = null,
        $partialRetentionRule = null,
        $retentionRuleCode = null,
        $depositStartDate = null,
        $depositEndDate = null,
        $originatingStartDate = null,
        $originatingEndDate = null
    );

195
196
197
198
199
200
201
202
203
204
    /**
     * Get archives list
     * @param string  $originatorOrgRegNumber The organization registration number
     * @param string  $filePlanPosition       The file plan position
     * @param boolean $archiveUnit            List the archive unit
     *
     * @action recordsManagement/archive/index
     */
    public function readList($originatorOrgRegNumber, $filePlanPosition = null, $archiveUnit = false);

205
    /**
206
     * Get archives Count without limit
207
208
209
210
211
     *
     * @param string  $originatorOrgRegNumber The organization registration number
     * @param string  $filePlanPosition       The file plan position
     * @param boolean $archiveUnit            List the archive unit
     *
212
     * @action recordsManagement/archive/countList
213
     */
214
    public function readCountList($originatorOrgRegNumber, $filePlanPosition = null, $archiveUnit = false);
215

Prosper De Laure's avatar
Prosper De Laure committed
216
217
218
219
220
    /*
        MODIFY ARCHIVES
    */
    /**
     * Suspend archives
221
222
223
     * @param array  $archiveIds Array of archive identifier
     * @param string $comment    The comment of modification
     * @param string $identifier Message identifier
Prosper De Laure's avatar
Prosper De Laure committed
224
225
226
227
     *
     * @action recordsManagement/archive/freeze
     *
     */
228
    public function updateFreeze($archiveIds, $comment = null, $identifier = null);
Prosper De Laure's avatar
Prosper De Laure committed
229
230
231

    /**
     * Change the status of an archive
232
233
234
     * @param mixed  $archiveIds Array of archive identifier
     * @param string $comment    The comment of modification
     * @param string $identifier Message identifier
Prosper De Laure's avatar
Prosper De Laure committed
235
236
237
     *
     * @action recordsManagement/archive/unfreeze
     */
238
    public function updateUnfreeze($archiveIds, $comment = null, $identifier = null);
Prosper De Laure's avatar
Prosper De Laure committed
239
240
241

    /**
     * Read the retention rule of multiple archives
242
     * @param mixed $archiveIds Array of archive identifier or sigle archive identifier
Prosper De Laure's avatar
Prosper De Laure committed
243
244
245
246
247
248
249
250
251
252
253
254
     *
     * @action recordsManagement/archive/editArchiveRetentionRule
     *
     */
    public function readRetentionrule($archiveIds);

    /**
     * Update a retention rule
     * @param recordsManagement/archiveRetentionRule $retentionRule The retention rule object
     * @param array                                  $archiveIds    The archives ids
     *
     * @action recordsManagement/archive/modifyRetentionRule
255
     * @example /public/tests/updateArchivesRetentionRule-standard.json example-standard
Prosper De Laure's avatar
Prosper De Laure committed
256
257
     *
     */
258
    public function updateRetentionrule($retentionRule, $archiveIds, $comment = null, $identifier = null);
Prosper De Laure's avatar
Prosper De Laure committed
259
260
261

    /**
     * Find archives
262
263
264
265
     * @param string $description The query string with arguments
     * @param string $text        The query string for text search
     * @param string $profile     The profile name
     * @param int    $limit       The result limit
Prosper De Laure's avatar
Prosper De Laure committed
266
267
268
269
     *
     * @action recordsManagement/archive/find
     *
     */
270
    public function readFind($description = '', $text = '', $profile = '', $limit = null);
Prosper De Laure's avatar
Prosper De Laure committed
271
272
273
274
275
276
277
278
279
280
281
282

    /**
     * Read the access rule of multiple archives
     * @param array $archiveIds Array of archive identifier or sigle archive identifier
     *
     * @action recordsManagement/archive/editArchiveAccessRule
     *
     */
    public function readAccessrule($archiveIds);

    /**
     * Update a access rule
283
284
285
286
     * @param recordsManagement/archiveAccessRule $accessRule The access rule object
     * @param array                               $archiveIds The archives ids
     * @param string                              $comment    The comment of modification
     * @param string                              $identifier Message identifier
Prosper De Laure's avatar
Prosper De Laure committed
287
288
289
290
     *
     * @action recordsManagement/archive/modifyAccessRule
     *
     */
291
    public function updateAccessrule($accessRule, $archiveIds = null, $comment = null, $identifier = null);
Prosper De Laure's avatar
Prosper De Laure committed
292
293
294
295
296
297

    /*
        RESTITUTION
    */
    /**
     * Flag archives for restitution
298
299
300
     * @param array  $archiveIds Array of archive identifier
     * @param string $identifier The message reference
     * @param string $comment    A comment
Prosper De Laure's avatar
Prosper De Laure committed
301
302
303
304
     *
     * @action recordsManagement/archive/setForRestitution
     *
     */
305
    public function updateSetforrestitution($archiveIds, $identifier = null, $comment = null);
Prosper De Laure's avatar
Prosper De Laure committed
306
307
308
309
310
311

    /*
        DESTRUCTION
    */
    /**
     * Flag archives for disposal
312
313
314
     * @param array  $archiveIds The archives ids
     * @param string $comment    The comment of modification
     * @param string $identifier Message identifier
Prosper De Laure's avatar
Prosper De Laure committed
315
316
317
318
319
320
321
     *
     * @return boolean
     *
     * @request UPDATE recordsManagement/dispose
     * @action recordsManagement/archive/dispose
     *
     */
322
    public function updateDisposearchives($archiveIds, $comment = null, $identifier = null);
Prosper De Laure's avatar
Prosper De Laure committed
323

324
325
326
327
328
329
330
331
332
    /**
     * Delete disposable archives
     *
     * @return boolean
     *
     * @action recordsManagement/archive/destructDisposableArchives
     */
    public function deleteDisposablearchives();

Prosper De Laure's avatar
Prosper De Laure committed
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
    /**
     * Delete disposable archives
     * @param array $archiveIds The archives ids
     *
     * @return boolean
     *
     * @action recordsManagement/archive/destruct
     */
    public function deleteDisposearchives($archiveIds);

    /**
     * Cancel archives destruction
     * @param array $archiveIds Array of archive identifier
     *
     * @return boolean
     *
     * @request UPDATE recordsManagement/cancelDestruction
     * @action recordsManagement/archive/cancelDestruction
     *
     */
    public function updateCancelDestruction($archiveIds);

    /*
        Conversion
    */
    /**
     * Flag archives for conversion
     * @param array $documentIds Array of document identifier
     *
     * @action recordsManagement/archive/conversion
     */
    public function updateDocumentsconversion($documentIds);

    /*
        PRESERVATION
    */
    /**
     * Verify archives integrity
     * @param array $archiveIds Array of archive identifier
     *
     * @action recordsManagement/archive/verifyIntegrity
     *
     */
    public function readIntegritycheck($archiveIds);
377

378
379
380
381
382
    /*
     *  METADATA
     */
    /**
     * Update metadata of archive
383
384
     * @param string $archiveId
     * @param string $originatorArchiveId
Alexandre Morin's avatar
Alexandre Morin committed
385
     * @param string $archiverArchiveId
386
     * @param string $archiveName
387
     * @param date   $originatingDate
Alexandre Morin's avatar
Alexandre Morin committed
388
     * @param mixed  $description
389
     *
390
391
     * @action recordsManagement/archive/modifyMetadata
     */
Alexandre Morin's avatar
Alexandre Morin committed
392
    public function updateMetadata($archiveId,$originatorArchiveId = null,$archiverArchiveId = null,$archiveName = null,$originatingDate=null,$description = null);
393
394
395

    /**
     * List an archive resources and children archives
396
     *
397
398
399
     * @action recordsManagement/archiveFilePlanPosition/listArchiveContents
     */
    public function readArchivecontents_archive_();
400
401
402
403
404


    /**
     * Move an archive into a folder
     * @param string $archiveId the archive identifier
405
     * @param string $folderId  The folder identifier
406
     *
407
     * @action recordsManagement/archiveFilePlanPosition/moveArchiveToFolder
408
     */
409
410
411
412
413
414
415
    public function udpateMovearchivetofolder($archiveId, $folderId=null);

    /**
     * Move an archive into a folder
     * @param array  $archiveIds   The archive identifier list
     * @param string $fromFolderId The originating folder identifier
     * @param string $toFolderId   The destination folder identifier
416
     *
417
418
419
     * @action recordsManagement/archiveFilePlanPosition/moveArchivesToFolder
     */
    public function udpateMovearchivestofolder($archiveIds, $fromFolderId=null, $toFolderId=null);
420
421

    /**
422
     * Index full text
423
424
425
426
427
     * @param int $limit The maximum number of archive to index
     *
     * @action recordsManagement/archive/indexFullText
     */
    public function updateIndexfulltext($limit=200);
Prosper De Laure's avatar
Prosper De Laure committed
428
429
430
431
432
433
434
435
436


    /**
     * Update archive with changed retention rule
     * @param int $limit The maximum number of archive to update
     *
     * @action recordsManagement/archive/updateArchiveRetentionRule
     */
    public function updateArchivesretentionrule($limit=500);
Prosper De Laure's avatar
Prosper De Laure committed
437
}