AttributeSetRepositoryInterface.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Catalog\Api;
  8. /**
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface AttributeSetRepositoryInterface
  13. {
  14. /**
  15. * Save attribute set data
  16. *
  17. * @param \Magento\Eav\Api\Data\AttributeSetInterface $attributeSet
  18. * @return \Magento\Eav\Api\Data\AttributeSetInterface saved attribute set
  19. * @throws \Magento\Framework\Exception\InputException
  20. * @throws \Magento\Framework\Exception\NoSuchEntityException
  21. * @throws \Magento\Framework\Exception\LocalizedException If attribute set is not found
  22. */
  23. public function save(\Magento\Eav\Api\Data\AttributeSetInterface $attributeSet);
  24. /**
  25. * Retrieve list of Attribute Sets
  26. *
  27. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
  28. * @return \Magento\Eav\Api\Data\AttributeSetSearchResultsInterface
  29. */
  30. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  31. /**
  32. * Retrieve attribute set information based on given ID
  33. *
  34. * @param int $attributeSetId
  35. * @throws \Magento\Framework\Exception\NoSuchEntityException If $attributeSetId is not found
  36. * @return \Magento\Eav\Api\Data\AttributeSetInterface
  37. */
  38. public function get($attributeSetId);
  39. /**
  40. * Remove given attribute set
  41. *
  42. * @param \Magento\Eav\Api\Data\AttributeSetInterface $attributeSet
  43. * @throws \Magento\Framework\Exception\NoSuchEntityException
  44. * @throws \Magento\Framework\Exception\InputException
  45. * @return bool
  46. */
  47. public function delete(\Magento\Eav\Api\Data\AttributeSetInterface $attributeSet);
  48. /**
  49. * Remove attribute set by given ID
  50. *
  51. * @param int $attributeSetId
  52. * @throws \Magento\Framework\Exception\NoSuchEntityException
  53. * @throws \Magento\Framework\Exception\InputException
  54. * @return bool
  55. */
  56. public function deleteById($attributeSetId);
  57. }