Skip to content

Commit c592ad5

Browse files
author
Vasiliev.A
committed
fix phpcs errors, unitTests, new webapi points to short and detailed bulk api statuses
1 parent 91c0e73 commit c592ad5

File tree

21 files changed

+481
-172
lines changed

21 files changed

+481
-172
lines changed
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
@@ -11,14 +10,22 @@
1110
* @api
1211
* @since 100.3.0
1312
*/
14-
interface BulkRepositoryInterface extends \Magento\Framework\Bulk\BulkStatusInterface
13+
interface BulkRepositoryInterface
1514
{
1615

1716
/**
1817
* @param string $bulkUuid
19-
* @return \Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface
18+
* @return \Magento\AsynchronousOperations\Api\Data\BulkStatus\DetailedInterface
2019
* @throws \Magento\Framework\Exception\NoSuchEntityException
2120
* @since 100.3.0
2221
*/
23-
public function getBulkDetails($bulkUuid);
22+
public function getBulkDetailedStatus($bulkUuid);
23+
24+
/**
25+
* @param string $bulkUuid
26+
* @return \Magento\AsynchronousOperations\Api\Data\BulkStatus\ShortInterface
27+
* @throws \Magento\Framework\Exception\NoSuchEntityException
28+
* @since 100.3.0
29+
*/
30+
public function getBulkShortStatus($bulkUuid);
2431
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\AsynchronousOperations\Api\Data\BulkStatus;
8+
9+
use Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface;
10+
use Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface;
11+
use Magento\AsynchronousOperations\Api\Data\OperationStatus\DetailedListInterface;
12+
13+
/**
14+
* Interface BulkStatusInterface
15+
*
16+
* @api
17+
* @since 100.3.0
18+
*/
19+
interface DetailedInterface extends BulkSummaryInterface
20+
{
21+
22+
const OPERATIONS_LIST = 'operations_list';
23+
const OPERATIONS_COUNTER = 'operations_counter';
24+
25+
/**
26+
* Retrieve operations list.
27+
*
28+
* @return \Magento\AsynchronousOperations\Api\Data\OperationStatus\DetailedInterface[]
29+
* @since 100.3.0
30+
*/
31+
public function getOperationsList();
32+
33+
/**
34+
* Set operations list.
35+
*
36+
* @param \Magento\AsynchronousOperations\Api\Data\OperationStatus\DetailedInterface[] $operationStatusList
37+
* @return $this
38+
* @since 100.3.0
39+
*/
40+
public function setOperationsList($operationStatusList);
41+
42+
/**
43+
* Retrieve operations counter object.
44+
*
45+
* @return \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface|null
46+
* @since 100.3.0
47+
*/
48+
public function getOperationsCounter();
49+
50+
/**
51+
* Set operations counter object.
52+
*
53+
* @param \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface $operationDetails
54+
* @return $this
55+
* @since 100.3.0
56+
*/
57+
public function setOperationsCounter(OperationDetailsInterface $operationDetails
58+
);
59+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\AsynchronousOperations\Api\Data\BulkStatus;
8+
9+
use Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface;
10+
use Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface;
11+
use Magento\AsynchronousOperations\Api\Data\OperationStatus\ShortListInterface;
12+
13+
/**
14+
* Interface BulkStatusInterface
15+
*
16+
* @api
17+
* @since 100.3.0
18+
*/
19+
interface ShortInterface extends BulkSummaryInterface
20+
{
21+
22+
const OPERATIONS_LIST = 'operations_list';
23+
const OPERATIONS_COUNTER = 'operations_counter';
24+
25+
/**
26+
* Retrieve operations list.
27+
*
28+
* @return \Magento\AsynchronousOperations\Api\Data\OperationStatus\ShortInterface[]
29+
* @since 100.3.0
30+
*/
31+
public function getOperationsList();
32+
33+
/**
34+
* Set operations list.
35+
*
36+
* @param \Magento\AsynchronousOperations\Api\Data\OperationStatus\ShortInterface[] $operationStatusList
37+
* @return $this
38+
* @since 100.3.0
39+
*/
40+
public function setOperationsList($operationStatusList);
41+
42+
/**
43+
* Retrieve operations counter object.
44+
*
45+
* @return \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface|null
46+
* @since 100.3.0
47+
*/
48+
public function getOperationsCounter();
49+
50+
/**
51+
* Set operations counter object.
52+
*
53+
* @param \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface $operationDetails
54+
* @return $this
55+
* @since 100.3.0
56+
*/
57+
public function setOperationsCounter(OperationDetailsInterface $operationDetails
58+
);
59+
}

app/code/Magento/AsynchronousOperations/Api/Data/OperationDetailsInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Magento\AsynchronousOperations\Api\Data;
88

99
/**
10-
* Interface
10+
* Provide details of operations
1111
*
1212
* @api
1313
* @since 100.3.0

app/code/Magento/AsynchronousOperations/Api/Data/OperationShortDetailsInterface.php renamed to app/code/Magento/AsynchronousOperations/Api/Data/OperationStatus/DetailedInterface.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
namespace Magento\AsynchronousOperations\Api\Data;
7+
namespace Magento\AsynchronousOperations\Api\Data\OperationStatus;
88

9-
use \Magento\Framework\Bulk\OperationInterface;
109
/**
11-
* Getter Class OperationShortDetailsInterface
10+
* Getter Class OperationsStatusInterface
1211
* Instead of OperationInterface this class don't provide all operation data
13-
* and not responsive to set any data, just get operation data without serialized_data
12+
* and not responsive to set any data, just to get operation data
13+
* without serialized_data and result_serialized_data
1414
*
1515
* @api
1616
* @since 100.3.0
1717
* @see \Magento\AsynchronousOperations\Api\Data\OperationInterface
1818
*/
19-
interface OperationShortDetailsInterface
19+
interface DetailedInterface
2020
{
2121
/**
2222
* Operation id
@@ -34,14 +34,6 @@ public function getId();
3434
*/
3535
public function getTopicName();
3636

37-
/**
38-
* Result serialized Data
39-
*
40-
* @return string
41-
* @since 100.3.0
42-
*/
43-
public function getResultSerializedData();
44-
4537
/**
4638
* Get operation status
4739
*
@@ -52,6 +44,14 @@ public function getResultSerializedData();
5244
*/
5345
public function getStatus();
5446

47+
/**
48+
* Result serialized Data
49+
*
50+
* @return string
51+
* @since 100.3.0
52+
*/
53+
public function getResultSerializedData();
54+
5555
/**
5656
* Get result message
5757
*
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\AsynchronousOperations\Api\Data\OperationStatus;
8+
9+
/**
10+
* Getter Class OperationsStatusInterface
11+
* Instead of OperationInterface this class don't provide all operation data
12+
* and not responsive to set any data, just to get operation data
13+
* without serialized_data and result_serialized_data
14+
*
15+
* @api
16+
* @since 100.3.0
17+
* @see \Magento\AsynchronousOperations\Api\Data\OperationInterface
18+
*/
19+
interface ShortInterface
20+
{
21+
/**
22+
* Operation id
23+
*
24+
* @return int
25+
* @since 100.3.0
26+
*/
27+
public function getId();
28+
29+
/**
30+
* Get operation status
31+
*
32+
* OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED
33+
*
34+
* @return int
35+
* @since 100.3.0
36+
*/
37+
public function getStatus();
38+
39+
/**
40+
* Get result message
41+
*
42+
* @return string
43+
* @since 100.3.0
44+
*/
45+
public function getResultMessage();
46+
47+
/**
48+
* Get error code
49+
*
50+
* @return int
51+
* @since 100.3.0
52+
*/
53+
public function getErrorCode();
54+
}

app/code/Magento/AsynchronousOperations/Api/Data/ShortOperationListInterface.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)