80 lines
3.1 KiB
C#
80 lines
3.1 KiB
C#
using Nop.Core.Domain.Topics;
|
|
|
|
namespace Nop.Services.Topics;
|
|
|
|
/// <summary>
|
|
/// Topic service interface
|
|
/// </summary>
|
|
public partial interface ITopicService
|
|
{
|
|
/// <summary>
|
|
/// Deletes a topic
|
|
/// </summary>
|
|
/// <param name="topic">Topic</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task DeleteTopicAsync(Topic topic);
|
|
|
|
/// <summary>
|
|
/// Gets a topic
|
|
/// </summary>
|
|
/// <param name="topicId">The topic identifier</param>
|
|
/// <returns>
|
|
/// A task that represents the asynchronous operation
|
|
/// The task result contains the topic
|
|
/// </returns>
|
|
Task<Topic> GetTopicByIdAsync(int topicId);
|
|
|
|
/// <summary>
|
|
/// Gets a topic
|
|
/// </summary>
|
|
/// <param name="systemName">The topic system name</param>
|
|
/// <param name="storeId">Store identifier; pass 0 to ignore filtering by store and load the first one</param>
|
|
/// <returns>
|
|
/// A task that represents the asynchronous operation
|
|
/// The task result contains the topic
|
|
/// </returns>
|
|
Task<Topic> GetTopicBySystemNameAsync(string systemName, int storeId = 0);
|
|
|
|
/// <summary>
|
|
/// Gets all topics
|
|
/// </summary>
|
|
/// <param name="storeId">Store identifier; pass 0 to load all records</param>
|
|
/// <param name="ignoreAcl">A value indicating whether to ignore ACL rules</param>
|
|
/// <param name="showHidden">A value indicating whether to show hidden topics</param>
|
|
/// <param name="onlyIncludedInTopMenu">A value indicating whether to show only topics which include on the top menu</param>
|
|
/// <returns>
|
|
/// A task that represents the asynchronous operation
|
|
/// The task result contains the topics
|
|
/// </returns>
|
|
Task<IList<Topic>> GetAllTopicsAsync(int storeId,
|
|
bool ignoreAcl = false, bool showHidden = false, bool onlyIncludedInTopMenu = false);
|
|
|
|
/// <summary>
|
|
/// Gets all topics
|
|
/// </summary>
|
|
/// <param name="storeId">Store identifier; pass 0 to load all records</param>
|
|
/// <param name="keywords">Keywords to search into body or title</param>
|
|
/// <param name="ignoreAcl">A value indicating whether to ignore ACL rules</param>
|
|
/// <param name="showHidden">A value indicating whether to show hidden topics</param>
|
|
/// <param name="onlyIncludedInTopMenu">A value indicating whether to show only topics which include on the top menu</param>
|
|
/// <returns>
|
|
/// A task that represents the asynchronous operation
|
|
/// The task result contains the topics
|
|
/// </returns>
|
|
Task<IList<Topic>> GetAllTopicsAsync(int storeId, string keywords,
|
|
bool ignoreAcl = false, bool showHidden = false, bool onlyIncludedInTopMenu = false);
|
|
|
|
/// <summary>
|
|
/// Inserts a topic
|
|
/// </summary>
|
|
/// <param name="topic">Topic</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task InsertTopicAsync(Topic topic);
|
|
|
|
/// <summary>
|
|
/// Updates the topic
|
|
/// </summary>
|
|
/// <param name="topic">Topic</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task UpdateTopicAsync(Topic topic);
|
|
} |