BulkStatusInterface.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Bulk;
  7. /**
  8. * Interface BulkStatusInterface
  9. * @api
  10. * @since 102.0.1
  11. */
  12. interface BulkStatusInterface
  13. {
  14. /**
  15. * Get failed operations by bulk uuid
  16. *
  17. * @param string $bulkUuid
  18. * @param int|null $failureType
  19. * @return \Magento\Framework\Bulk\OperationInterface[]
  20. * @since 102.0.1
  21. */
  22. public function getFailedOperationsByBulkId($bulkUuid, $failureType = null);
  23. /**
  24. * Get operations count by bulk uuid and status.
  25. *
  26. * @param string $bulkUuid
  27. * @param int $status
  28. * @return int
  29. * @since 102.0.1
  30. */
  31. public function getOperationsCountByBulkIdAndStatus($bulkUuid, $status);
  32. /**
  33. * Get all bulks created by user
  34. *
  35. * @param int $userId
  36. * @return BulkSummaryInterface[]
  37. * @since 102.0.1
  38. */
  39. public function getBulksByUser($userId);
  40. /**
  41. * Computational status based on statuses of belonging operations
  42. *
  43. * FINISHED_SUCCESFULLY - all operations are handled succesfully
  44. * FINISHED_WITH_FAILURE - some operations are handled with failure
  45. *
  46. * @param string $bulkUuid
  47. * @return int NOT_STARTED | IN_PROGRESS | FINISHED_SUCCESFULLY | FINISHED_WITH_FAILURE
  48. * @since 102.0.1
  49. */
  50. public function getBulkStatus($bulkUuid);
  51. }