archiveTransferInterface.php 6.07 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
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/*
 * Copyright (C) 2015 Maarch
 *
 * This file is part of bundle medona.
 *
 * Bundle medona 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 medona 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 medona.  If not, see <http://www.gnu.org/licenses/>.
 */
namespace ext\thirdPartyArchiving\bundle\medona;

/**
 * Archive transfer interface
 *
 * @package Medona
 * @author  Alexis Ragot <alexis.ragot@maarch.org>
 */
interface archiveTransferInterface 
    extends messageInterface
{
    /**
     * Get ingoing transfer messages
     *
     * @action medona/ArchiveTransfer/listReception
     */
    public function readIncominglist();

    /**
     * Get outgoing transfer messages
     *
     * @action medona/ArchiveTransfer/listSending
     */
    public function readOutgoinglist();

    /**
     * Get outgoing transfer messages
Alexandre Morin's avatar
Alexandre Morin committed
47
48
49
50
51
52
53
54
55
     *
     * @param string $reference         Reference
     * @param string $archiver          Archiver
     * @param string $originator        Originator
     * @param string $depositor         Depositor
     * @param string $archivalAgreement Archival agreement
     * @param date   $fromDate          From date
     * @param date   $toDate            To date
     * @param string $status            Status
Prosper De Laure's avatar
Prosper De Laure committed
56
57
58
     *
     * @action medona/ArchiveTransfer/history
     */
Alexandre Morin's avatar
Alexandre Morin committed
59
    public function readHistory($reference = null, $archiver = null, $originator = null, $depositor = null, $archivalAgreement = null, $fromDate = null, $toDate = null, $status = null);
Prosper De Laure's avatar
Prosper De Laure committed
60
61
62
63
64
65
66
67
68
69
70
71

    /**
     * Count transfer messages
     * 
     * @action medona/ArchiveTransfer/count
     */
    public function readCount();

    /**
     * Receive message with all contents embedded
     * @param string $messageFile The message binary contents OR a filename
     * @param array  $attachments An array of filenames for attachments
72
     * @param string $schema      The schema of the message file
Prosper De Laure's avatar
Prosper De Laure committed
73
     * @param string $filename    The message file name
Prosper De Laure's avatar
Prosper De Laure committed
74
75
76
     *
     * @action medona/ArchiveTransfer/receive
     */
Alexis Ragot's avatar
Alexis Ragot committed
77
    public function create($messageFile, $attachments = array(), $schema = false, $filename = null);
Prosper De Laure's avatar
Prosper De Laure committed
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

    /**
     * Validate messages against schema and rules
     *
     * @action medona/ArchiveTransfer/validateBatch
     */
    public function updateValidateBatch();

    /**
     * Validate message
     *
     * @action medona/ArchiveTransfer/validate
     */
    public function updateValidate_messageId_();

Cyril Vazquez's avatar
Cyril Vazquez committed
93
94
95
96
97
98
99
    /**
     * Validate draft message
     *
     * @action medona/ArchiveTransfer/validateDraft
     */
    public function updateValidatedraft_messageId_();

Prosper De Laure's avatar
Prosper De Laure committed
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
    /**
     * Validate messages against schema and rules
     *
     * @action medona/ArchiveTransfer/processBatch
     */
    public function updateProcessBatch();

    /**
     * Validate archive transfer
     *
     * @action medona/ArchiveTransfer/validate
     */
    public function updateRequestvalidate_messageId_();

    /**
     * Accept archive transfer
     *
     * @action medona/ArchiveTransfer/accept
     */
    public function updateRequestacceptance_messageId_();

    /**
     * Reject archive transfer
     * @param string $messageId The message identifier
     * @param string $comment   A comment
     *
     * @action medona/ArchiveTransfer/reject
     */
    public function updateRequestrejection($messageId, $comment = null);

    /**
     * Process archive transfer
     *
     * @action medona/ArchiveTransfer/process
     */
    public function updateProcess_messageId_();
136

137
    /*********** OUTGOING TRANSFER ******************/
138
139

    /**
140
     * Create outgoing transfer
141
     * @param array $archiveIds            List of archives
142
143
144
145
146
147
     * @param string $archiverOrgRegNumber  An Archiver
     * @param string $comment               A comment
     * @param string $identifier            An identifier
     *
     * @action medona/ArchiveTransferSending/setForTransfer
     */
148
149
150
151
152
153
154
155
156
157
158
159
160
161
    public function updateOutgoingtransferSending($archiveIds, $archiverOrgRegNumber, $comment, $identifier = null);

    /**
     * Get ingoing transfer messages
     *
     * @action medona/ArchiveTransferSending/listReception
     */
    public function readOutgoingtransferReception();

    /**
     * Get process transfer messages
     *
     * @action medona/ArchiveTransferSending/processList
     */
162
    public function readOutgoingtransferProcessList();
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

    /**
     * Get outgoing transfer messages
     * @param string    $reference
     * @param string    $archiver
     * @param string    $originator
     * @param string    $depositor
     * @param string    $archivalAgreement
     * @param date      $fromDate
     * @param date      $toDate
     *
     * @action medona/ArchiveTransferSending/history
     */
    public function readOutgoingtransferHistory($reference = null, $archiver = null, $originator = null, $depositor = null, $archivalAgreement = null, $fromDate = null, $toDate = null);

    /**
     * Export outgoing transfer
     *
     * @action medona/ArchiveTransferSending/export
     */
    public function readOutgoingtransfer_messageId_exportArchive();


    /**
     * Reject outgoing transfer
     * @param string $messageId The message identifier
     * @param string $comment   A comment
     *
     * @action medona/ArchiveTransferSending/reject
     */
    public function updateOutgoingtransfer_messageId_reject($messageId, $comment = null);

    /**
     * Acquite outgoing transfer
     *
     * @action medona/ArchiveTransferSending/acknowledge
     */
    public function updateOutgoingtransfer_messageId_acknowledge();

    /**
     * Process outgoing transfer
     *
     * @action medona/ArchiveTransferSending/process
     */
    public function updateOutgoingtransfer_messageId_Process();
Prosper De Laure's avatar
Prosper De Laure committed
208
}