BookmarkRepositoryInterface.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\Api;
  7. /**
  8. * Bookmark CRUD interface
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface BookmarkRepositoryInterface
  14. {
  15. /**
  16. * Save bookmark
  17. *
  18. * @param \Magento\Ui\Api\Data\BookmarkInterface $bookmark
  19. * @return \Magento\Ui\Api\Data\BookmarkInterface
  20. * @throws \Magento\Framework\Exception\LocalizedException
  21. */
  22. public function save(\Magento\Ui\Api\Data\BookmarkInterface $bookmark);
  23. /**
  24. * Retrieve bookmark
  25. *
  26. * @param int $bookmarkId
  27. * @return \Magento\Ui\Api\Data\BookmarkInterface
  28. * @throws \Magento\Framework\Exception\LocalizedException
  29. */
  30. public function getById($bookmarkId);
  31. /**
  32. * Retrieve bookmarks matching the specified criteria
  33. *
  34. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
  35. * @return \Magento\Ui\Api\Data\BookmarkSearchResultsInterface
  36. * @throws \Magento\Framework\Exception\LocalizedException
  37. */
  38. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  39. /**
  40. * Delete bookmark
  41. *
  42. * @param \Magento\Ui\Api\Data\BookmarkInterface $bookmark
  43. * @return bool true on success
  44. * @throws \Magento\Framework\Exception\LocalizedException
  45. */
  46. public function delete(\Magento\Ui\Api\Data\BookmarkInterface $bookmark);
  47. /**
  48. * Delete bookmark by ID
  49. *
  50. * @param int $bookmarkId
  51. * @return bool true on success
  52. * @throws \Magento\Framework\Exception\NoSuchEntityException
  53. * @throws \Magento\Framework\Exception\LocalizedException
  54. */
  55. public function deleteById($bookmarkId);
  56. }