Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

IStoreMappingService.cs

using Nop.Core;
using Nop.Core.Domain.Stores;

namespace Nop.Services.Stores;

/// 
/// Store mapping service interface
/// 
public partial interface IStoreMappingService
{
    /// 
    /// Apply store mapping to the passed query
    /// 
    /// Type of entity that supports store mapping
    /// Query to filter
    /// Store identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the filtered query
    /// 
    Task> ApplyStoreMapping(IQueryable query, int storeId) where TEntity : BaseEntity, IStoreMappingSupported;

    /// 
    /// Deletes a store mapping record
    /// 
    /// Store mapping record
    /// A task that represents the asynchronous operation
    Task DeleteStoreMappingAsync(StoreMapping storeMapping);

    /// 
    /// Gets store mapping records
    /// 
    /// Type of entity that supports store mapping
    /// Entity
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the store mapping records
    /// 
    Task> GetStoreMappingsAsync(TEntity entity) where TEntity : BaseEntity, IStoreMappingSupported;

    /// 
    /// Inserts a store mapping record
    /// 
    /// Type of entity that supports store mapping
    /// Entity
    /// Store id
    /// A task that represents the asynchronous operation
    Task InsertStoreMappingAsync(TEntity entity, int storeId) where TEntity : BaseEntity, IStoreMappingSupported;

    /// 
    /// Find store identifiers with granted access (mapped to the entity)
    /// 
    /// Type of entity that supports store mapping
    /// Entity
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the store identifiers
    /// 
    Task GetStoresIdsWithAccessAsync(TEntity entity) where TEntity : BaseEntity, IStoreMappingSupported;

    /// 
    /// Find store identifiers with granted access (mapped to the entity)
    /// 
    /// Type of entity that supports store mapping
    /// Entity
    /// 
    /// The store identifiers
    /// 
    int[] GetStoresIdsWithAccess(TEntity entity) where TEntity : BaseEntity, IStoreMappingSupported;

    /// 
    /// Authorize whether entity could be accessed in the current store (mapped to this store)
    /// 
    /// Type of entity that supports store mapping
    /// Entity
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains true - authorized; otherwise, false
    /// 
    Task AuthorizeAsync(TEntity entity) where TEntity : BaseEntity, IStoreMappingSupported;

    /// 
    /// Authorize whether entity could be accessed in a store (mapped to this store)
    /// 
    /// Type of entity that supports store mapping
    /// Entity
    /// Store identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains true - authorized; otherwise, false
    /// 
    Task AuthorizeAsync(TEntity entity, int storeId) where TEntity : BaseEntity, IStoreMappingSupported;

    /// 
    /// Authorize whether entity could be accessed in a store (mapped to this store)
    /// 
    /// Type of entity that supports store mapping
    /// Entity
    /// Store identifier
    /// 
    /// True - authorized; otherwise, false
    /// 
    bool Authorize(TEntity entity, int storeId) where TEntity : BaseEntity, IStoreMappingSupported;
}