<?php
/**
* Copyright © Landofcoder.com All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Lofmp\Blog\Api;
use Magento\Framework\Api\SearchCriteriaInterface;
interface TagRepositoryInterface
{
/**
* Save Tag
* @param \Lofmp\Blog\Api\Data\TagInterface $tag
* @return \Lofmp\Blog\Api\Data\TagInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function save(
\Lofmp\Blog\Api\Data\TagInterface $tag
);
/**
* Retrieve tag
* @param int $tagId
* @return \Lofmp\Blog\Api\Data\TagInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function get($tagId);
/**
* Retrieve tag
* @param string $tagAlias
* @return \Lofmp\Blog\Api\Data\TagInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function view($tagAlias);
/**
* Retrieve Tag matching the specified criteria.
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return \Lofmp\Blog\Api\Data\TagSearchResultsInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getList(
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
);
/**
* Retrieve Public Tag matching the specified criteria.
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return \Lofmp\Blog\Api\Data\TagSearchResultsInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getPublishList(
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
);
/**
* Retrieve seller Tag matching the specified criteria.
* @param string $sellerUrl
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return \Lofmp\Blog\Api\Data\TagSearchResultsInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getSellerTags(
string $sellerUrl,
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
);
/**
* Delete Tag
* @param \Lofmp\Blog\Api\Data\TagInterface $tag
* @return bool true on success
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function delete(
\Lofmp\Blog\Api\Data\TagInterface $tag
);
/**
* Delete Tag by ID
* @param int $tagId
* @return bool true on success
* @throws \Magento\Framework\Exception\NoSuchEntityException
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function deleteById($tagId);
}
|