messageInterface.php 3.66 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
<?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;

/**
 * Standard interface for log archive description class
 *
 * @package Medona
 * @author  Prosper DE LAURE <prosper.delaure@maarch.org>
 */
interface messageInterface
{
    /**
Alexandre Morin's avatar
Alexandre Morin committed
31
     * Get outgoing transfer messages
Prosper De Laure's avatar
Prosper De Laure committed
32
     *
Alexandre Morin's avatar
Alexandre Morin committed
33
     * @action medona/message/getByReference
Prosper De Laure's avatar
Prosper De Laure committed
34
     */
Alexandre Morin's avatar
Alexandre Morin committed
35
    public function readReference($reference);
Prosper De Laure's avatar
Prosper De Laure committed
36

37
    /**
Alexandre Morin's avatar
Alexandre Morin committed
38
     * Read a message
39
     *
Alexandre Morin's avatar
Alexandre Morin committed
40
     * @action medona/message/read
41
     */
Alexandre Morin's avatar
Alexandre Morin committed
42
    public function read_messageId_();
43

Prosper De Laure's avatar
Prosper De Laure committed
44
45
46
47
48
49
50
    /**
     * Read a message
     *
     * @action medona/message/export
     */
    public function read_messageId_Export();

51
52
53
54
55
56
57
    /**
     * Retry a message
     *
     * @action medona/message/retry
     */
    public function read_messageId_Retry();

Prosper De Laure's avatar
Prosper De Laure committed
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
    /**
     * Read a message attachment
     *
     * @action medona/message/getDataObjectAttachment
     */
    public function read_messageId_Attachment_attachmentId_();

    /**
     * End a transaction
     *
     * @action medona/message/endTransaction
     */
    public function updateEndtransaction_messageId_();

    /**
     * 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
     *
     * @action medona/ArchiveTransfer/receive
     */
    /* public function createArchivetransfer($messageFile, $attachments = array());*/

    /**
     * Validate message against schema and rules
     * @param string $message
     *
     * @action medona/ArchiveTransfer/validate
     */
    //public function updateValidateArchivetransfer($message);

    /**
     * Count active messages for each type
     *
     * @action medona/message/countActiveMessages
     */
    public function readCount();

    /**
     * Search message by sender / recipient / reference / date
Alexandre Morin's avatar
Alexandre Morin committed
98
99
100
101
102
103
104
105
106
107
     *
     * @param string $type              Type
     * @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
108
109
110
     *
     * @action medona/message/search
     */
Alexandre Morin's avatar
Alexandre Morin committed
111
    public function readSearch($type, $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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

    /**
     * Archive messages
     *
     * @action medona/message/archiveMessages
     */
    public function updateArchive();

    /**
     * Archive a message
     *
     * @action medona/message/archiveMessage
     */
    public function update_messageId_Archive();

    /**
     * Service to remove message directory
     *
     * @action medona/message/MessageDirectoryPurge
     */
    public function deleteMessagedirectorypurge();
}