BulkSummaryInterface.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 BulkSummaryInterface
  9. * @api
  10. * @since 102.0.1
  11. */
  12. interface BulkSummaryInterface
  13. {
  14. /**#@+
  15. * Constants for keys of data array. Identical to the name of the getter in snake case
  16. */
  17. const BULK_ID = 'uuid';
  18. const DESCRIPTION = 'description';
  19. const START_TIME = 'start_time';
  20. const USER_ID = 'user_id';
  21. const OPERATION_COUNT = 'operation_count';
  22. /**#@-*/
  23. /**#@+
  24. * Bulk statuses constants
  25. */
  26. const NOT_STARTED = 0;
  27. const IN_PROGRESS = 1;
  28. const FINISHED_SUCCESSFULLY = 2;
  29. const FINISHED_WITH_FAILURE = 3;
  30. /**#@-*/
  31. /**
  32. * Get bulk uuid
  33. *
  34. * @return string
  35. * @since 102.0.1
  36. */
  37. public function getBulkId();
  38. /**
  39. * Set bulk uuid
  40. *
  41. * @param string $bulkUuid
  42. * @return $this
  43. * @since 102.0.1
  44. */
  45. public function setBulkId($bulkUuid);
  46. /**
  47. * Get bulk description
  48. *
  49. * @return string
  50. * @since 102.0.1
  51. */
  52. public function getDescription();
  53. /**
  54. * Set bulk description
  55. *
  56. * @param string $description
  57. * @return $this
  58. * @since 102.0.1
  59. */
  60. public function setDescription($description);
  61. /**
  62. * Get bulk scheduled time
  63. *
  64. * @return string
  65. * @since 102.0.1
  66. */
  67. public function getStartTime();
  68. /**
  69. * Set bulk scheduled time
  70. *
  71. * @param string $timestamp
  72. * @return $this
  73. * @since 102.0.1
  74. */
  75. public function setStartTime($timestamp);
  76. /**
  77. * Get user id
  78. *
  79. * @return int
  80. * @since 102.0.1
  81. */
  82. public function getUserId();
  83. /**
  84. * Set user id
  85. *
  86. * @param int $userId
  87. * @return $this
  88. * @since 102.0.1
  89. */
  90. public function setUserId($userId);
  91. /**
  92. * Get total number of operations scheduled in scope of this bulk
  93. *
  94. * @return int
  95. * @since 102.0.1
  96. */
  97. public function getOperationCount();
  98. /**
  99. * Set total number of operations scheduled in scope of this bulk
  100. *
  101. * @param int $operationCount
  102. * @return $this
  103. * @since 102.0.1
  104. */
  105. public function setOperationCount($operationCount);
  106. }