-
Notifications
You must be signed in to change notification settings - Fork 17
Bulk api status #6
Changes from 6 commits
dbcd678
3300447
68b8a8e
91c0e73
c592ad5
6b8e66a
62797ce
5a373c1
21f07c9
fc35895
5bff58b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\AsynchronousOperations\Api; | ||
|
||
/** | ||
* @api | ||
* @since 100.3.0 | ||
*/ | ||
interface BulkRepositoryInterface | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does not look like repository, which usually has CRUD operations. How about |
||
{ | ||
|
||
/** | ||
* @param string $bulkUuid | ||
* @return \Magento\AsynchronousOperations\Api\Data\BulkStatus\DetailedInterface | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException | ||
* @since 100.3.0 | ||
*/ | ||
public function getBulkDetailedStatus($bulkUuid); | ||
|
||
/** | ||
* @param string $bulkUuid | ||
* @return \Magento\AsynchronousOperations\Api\Data\BulkStatus\ShortInterface | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException | ||
* @since 100.3.0 | ||
*/ | ||
public function getBulkShortStatus($bulkUuid); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\AsynchronousOperations\Api\Data\BulkStatus; | ||
|
||
use Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface; | ||
use Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface; | ||
|
||
/** | ||
* Interface BulkStatusInterface | ||
* | ||
* @api | ||
* @since 100.3.0 | ||
*/ | ||
interface DetailedInterface extends BulkSummaryInterface | ||
{ | ||
|
||
const OPERATIONS_LIST = 'operations_list'; | ||
const OPERATIONS_COUNTER = 'operations_counter'; | ||
|
||
/** | ||
* Retrieve operations list. | ||
* | ||
* @return \Magento\AsynchronousOperations\Api\Data\OperationStatus\DetailedInterface[] | ||
* @since 100.3.0 | ||
*/ | ||
public function getOperationsList(); | ||
|
||
/** | ||
* Set operations list. | ||
* | ||
* @param \Magento\AsynchronousOperations\Api\Data\OperationStatus\DetailedInterface[] $operationStatusList | ||
* @return $this | ||
* @since 100.3.0 | ||
*/ | ||
public function setOperationsList($operationStatusList); | ||
|
||
/** | ||
* Retrieve operations counter object. | ||
* | ||
* @return \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface|null | ||
* @since 100.3.0 | ||
*/ | ||
public function getOperationsCounter(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not clear why counter type is |
||
|
||
/** | ||
* Set operations counter object. | ||
* | ||
* @param \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface $operationDetails | ||
* @return $this | ||
* @since 100.3.0 | ||
*/ | ||
public function setOperationsCounter(OperationDetailsInterface $operationDetails | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\AsynchronousOperations\Api\Data\BulkStatus; | ||
|
||
use Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface; | ||
use Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface; | ||
|
||
/** | ||
* Interface BulkStatusInterface | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add proper description for all classes/interfaces, especially |
||
* | ||
* @api | ||
* @since 100.3.0 | ||
*/ | ||
interface ShortInterface extends BulkSummaryInterface | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interfaces could be renamed to |
||
{ | ||
|
||
const OPERATIONS_LIST = 'operations_list'; | ||
const OPERATIONS_COUNTER = 'operations_counter'; | ||
|
||
/** | ||
* Retrieve operations list. | ||
* | ||
* @return \Magento\AsynchronousOperations\Api\Data\OperationStatus\ShortInterface[] | ||
* @since 100.3.0 | ||
*/ | ||
public function getOperationsList(); | ||
|
||
/** | ||
* Set operations list. | ||
* | ||
* @param \Magento\AsynchronousOperations\Api\Data\OperationStatus\ShortInterface[] $operationStatusList | ||
* @return $this | ||
* @since 100.3.0 | ||
*/ | ||
public function setOperationsList($operationStatusList); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the method be named |
||
|
||
/** | ||
* Retrieve operations counter object. | ||
* | ||
* @return \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface|null | ||
* @since 100.3.0 | ||
*/ | ||
public function getOperationsCounter(); | ||
|
||
/** | ||
* Set operations counter object. | ||
* | ||
* @param \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface $operationDetails | ||
* @return $this | ||
* @since 100.3.0 | ||
*/ | ||
public function setOperationsCounter(OperationDetailsInterface $operationDetails | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\AsynchronousOperations\Api\Data; | ||
|
||
/** | ||
* Provide details of operations | ||
* | ||
* @api | ||
* @since 100.3.0 | ||
*/ | ||
interface OperationDetailsInterface | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name of the interface and some of its methods does not sound logical. It does not represent details for single operation, it represents status of the bulk of operations, there is no |
||
{ | ||
/** | ||
* Total operations count | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getOperationsTotal(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
/** | ||
* Open operations count | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please correct description |
||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getOpen(); | ||
|
||
/** | ||
* Successfully completed operations count | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getOperationsSuccessful(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
/** | ||
* Total failed operations count | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getTotalFailed(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
/** | ||
* Failed not retriable operations count | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getFailedNotRetriable(); | ||
|
||
/** | ||
* Failed retriable operations count | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getFailedRetriable(); | ||
|
||
/** | ||
* Rejected operations count | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getRejected(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\AsynchronousOperations\Api\Data\OperationStatus; | ||
|
||
/** | ||
* Getter Class OperationsStatusInterface | ||
* Instead of OperationInterface this class don't provide all operation data | ||
* and not responsive to set any data, just to get operation data | ||
* without serialized_data and result_serialized_data | ||
* | ||
* @api | ||
* @since 100.3.0 | ||
* @see \Magento\AsynchronousOperations\Api\Data\OperationInterface | ||
*/ | ||
interface DetailedInterface | ||
{ | ||
/** | ||
* Operation id | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getId(); | ||
|
||
/** | ||
* Message Queue Topic | ||
* | ||
* @return string | ||
* @since 100.3.0 | ||
*/ | ||
public function getTopicName(); | ||
|
||
/** | ||
* Get operation status | ||
* | ||
* OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getStatus(); | ||
|
||
/** | ||
* Result serialized Data | ||
* | ||
* @return string | ||
* @since 100.3.0 | ||
*/ | ||
public function getResultSerializedData(); | ||
|
||
/** | ||
* Get result message | ||
* | ||
* @return string | ||
* @since 100.3.0 | ||
*/ | ||
public function getResultMessage(); | ||
|
||
/** | ||
* Get error code | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getErrorCode(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\AsynchronousOperations\Api\Data\OperationStatus; | ||
|
||
/** | ||
* Getter Class OperationsStatusInterface | ||
* Instead of OperationInterface this class don't provide all operation data | ||
* and not responsive to set any data, just to get operation data | ||
* without serialized_data and result_serialized_data | ||
* | ||
* @api | ||
* @since 100.3.0 | ||
* @see \Magento\AsynchronousOperations\Api\Data\OperationInterface | ||
*/ | ||
interface ShortInterface | ||
{ | ||
/** | ||
* Operation id | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getId(); | ||
|
||
/** | ||
* Get operation status | ||
* | ||
* OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getStatus(); | ||
|
||
/** | ||
* Get result message | ||
* | ||
* @return string | ||
* @since 100.3.0 | ||
*/ | ||
public function getResultMessage(); | ||
|
||
/** | ||
* Get error code | ||
* | ||
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getErrorCode(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to put
@since
annotation, it will be added automatically by release publication tools.