using Nop.Core; using Nop.Core.Domain.Seo; namespace Nop.Services.Seo; /// /// Provides information about URL records /// public partial interface IUrlRecordService { /// /// Deletes an URL records /// /// URL records /// A task that represents the asynchronous operation Task DeleteUrlRecordsAsync(IList urlRecords); /// /// Gets an URL records /// /// URL record identifiers /// /// A task that represents the asynchronous operation /// The task result contains the uRL record /// Task> GetUrlRecordsByIdsAsync(int[] urlRecordIds); /// /// Inserts an URL record /// /// URL record /// A task that represents the asynchronous operation Task InsertUrlRecordAsync(UrlRecord urlRecord); /// /// Update an URL record /// /// URL record /// A task that represents the asynchronous operation Task UpdateUrlRecordAsync(UrlRecord urlRecord); /// /// Find URL record /// /// Slug /// /// A task that represents the asynchronous operation /// The task result contains the found URL record /// Task GetBySlugAsync(string slug); /// /// Gets all URL records /// /// Slug /// Language ID; "null" to load records with any language; "0" to load records with standard language only; otherwise to load records with specify language ID only /// A value indicating whether to get active records; "null" to load all records; "false" to load only inactive records; "true" to load only active records /// Page index /// Page size /// /// A task that represents the asynchronous operation /// The task result contains the uRL records /// Task> GetAllUrlRecordsAsync(string slug = "", int? languageId = null, bool? isActive = null, int pageIndex = 0, int pageSize = int.MaxValue); /// /// Find slug /// /// Entity identifier /// Entity name /// Language identifier /// /// A task that represents the asynchronous operation /// The task result contains the found slug /// Task GetActiveSlugAsync(int entityId, string entityName, int languageId); /// /// Save slug /// /// Type /// Entity /// Slug /// Language ID /// A task that represents the asynchronous operation Task SaveSlugAsync(T entity, string slug, int languageId) where T : BaseEntity, ISlugSupported; /// /// Get search engine friendly name (slug) /// /// Entity type /// Entity /// Language identifier; pass null to use the current language /// A value indicating whether to return default value (if language specified one is not found) /// A value indicating whether to ensure that we have at least two published languages; otherwise, load only default value /// /// A task that represents the asynchronous operation /// The task result contains the search engine name (slug) /// Task GetSeNameAsync(T entity, int? languageId = null, bool returnDefaultValue = true, bool ensureTwoPublishedLanguages = true) where T : BaseEntity, ISlugSupported; /// /// Get search engine friendly name (slug) /// /// Entity identifier /// Entity name /// Language identifier; pass null to use the current language /// A value indicating whether to return default value (if language specified one is not found) /// A value indicating whether to ensure that we have at least two published languages; otherwise, load only default value /// /// A task that represents the asynchronous operation /// The task result contains the search engine name (slug) /// Task GetSeNameAsync(int entityId, string entityName, int? languageId = null, bool returnDefaultValue = true, bool ensureTwoPublishedLanguages = true); /// /// Get SE name /// /// Name /// A value indicating whether non western chars should be converted /// A value indicating whether Unicode chars are allowed /// /// A task that represents the asynchronous operation /// The task result contains the result /// Task GetSeNameAsync(string name, bool convertNonWesternChars, bool allowUnicodeCharsInUrls); /// /// Validate search engine name /// /// Entity /// Search engine name to validate /// User-friendly name used to generate seName /// Ensure that seName is not empty /// /// A task that represents the asynchronous operation /// The task result contains the valid seName /// Task ValidateSeNameAsync(T entity, string seName, string name, bool ensureNotEmpty) where T : BaseEntity, ISlugSupported; /// /// Validate search engine name /// /// Entity identifier /// Entity name /// Search engine name to validate /// User-friendly name used to generate seName /// Ensure that seName is not empty /// /// A task that represents the asynchronous operation /// The task result contains the valid seName /// Task ValidateSeNameAsync(int entityId, string entityName, string seName, string name, bool ensureNotEmpty); }