-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
Copy pathOperationInterface.php
175 lines (157 loc) · 3.38 KB
/
OperationInterface.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
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Bulk;
/**
* Interface OperationInterface
* @api
* @since 103.0.0
*/
interface OperationInterface extends \Magento\Framework\Api\ExtensibleDataInterface
{
/**#@+
* Constants for keys of data array. Identical to the name of the getter in snake case
*/
const ID = 'operation_key';
const BULK_ID = 'bulk_uuid';
const TOPIC_NAME = 'topic_name';
const SERIALIZED_DATA = 'serialized_data';
const RESULT_SERIALIZED_DATA = 'result_serialized_data';
const STATUS = 'status';
const RESULT_MESSAGE = 'result_message';
const ERROR_CODE = 'error_code';
/**#@-*/
/**#@+
* Status types
*/
const STATUS_TYPE_COMPLETE = 1;
const STATUS_TYPE_RETRIABLY_FAILED = 2;
const STATUS_TYPE_NOT_RETRIABLY_FAILED = 3;
const STATUS_TYPE_OPEN = 4;
const STATUS_TYPE_REJECTED = 5;
/**#@-*/
/**
* Operation id
*
* @return int
* @since 103.0.0
*/
public function getId();
/**
* Set operation id
*
* @param int $id
* @return $this
* @since 103.0.0
*/
public function setId($id);
/**
* Get bulk uuid
*
* @return string
* @since 103.0.0
*/
public function getBulkUuid();
/**
* Set bulk uuid
*
* @param string $bulkId
* @return $this
* @since 103.0.0
*/
public function setBulkUuid($bulkId);
/**
* Message Queue Topic
*
* @return string
* @since 103.0.0
*/
public function getTopicName();
/**
* Set message queue topic
*
* @param string $topic
* @return $this
* @since 103.0.0
*/
public function setTopicName($topic);
/**
* Serialized Data
*
* @return string
* @since 103.0.0
*/
public function getSerializedData();
/**
* Set serialized data
*
* @param string $serializedData
* @return $this
* @since 103.0.0
*/
public function setSerializedData($serializedData);
/**
* Result serialized Data
*
* @return string
* @since 103.0.0
*/
public function getResultSerializedData();
/**
* Set result serialized data
*
* @param string $resultSerializedData
* @return $this
* @since 103.0.0
*/
public function setResultSerializedData($resultSerializedData);
/**
* Get operation status
*
* OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED
*
* @return int
* @since 103.0.0
*/
public function getStatus();
/**
* Set status
*
* @param int $status
* @return $this
* @since 103.0.0
*/
public function setStatus($status);
/**
* Get result message
*
* @return string
* @since 103.0.0
*/
public function getResultMessage();
/**
* Set result message
*
* @param string $resultMessage
* @return $this
* @since 103.0.0
*/
public function setResultMessage($resultMessage);
/**
* Get error code
*
* @return int
* @since 103.0.0
*/
public function getErrorCode();
/**
* Set error code
*
* @param int $errorCode
* @return $this
* @since 103.0.0
*/
public function setErrorCode($errorCode);
}