Class ProductAssignmentRuleMappingService
- Namespace
- Dynamicweb.Ecommerce.Products.ProductAssignment
- Assembly
- Dynamicweb.Ecommerce.dll
Provides access to the mappings between product assignment rules and the groups and products they assign.
public class ProductAssignmentRuleMappingService : ICacheStorage<string, ProductAssignmentRuleMappingItem>, ICacheStorage<string>, ICacheStorage
- Inheritance
-
ProductAssignmentRuleMappingService
- Implements
- Inherited Members
Properties
Info
Information about the object cache
public virtual CacheInformation Info { get; }
Property Value
Methods
ClearCache()
Resets all keys to the default value for objects stored in the object cache
public virtual void ClearCache()
ClearCache(IEnumerable<string>)
Resets the specified keys to the default value for objects stored in the object cache
public virtual void ClearCache(IEnumerable<string> keys)
Parameters
keysIEnumerable<string>Keys to reset
ClearCache(string)
Resets the specified key to the default value for objects stored in the object cache
public virtual void ClearCache(string key)
Parameters
keystringKey to reset
Delete(string)
Deletes the mapping with the given id.
public virtual void Delete(string mappingId)
Parameters
mappingIdstringThe mapping id.
DeleteAll(string)
Deletes all mappings belonging to the given rule.
public virtual void DeleteAll(string ruleId)
Parameters
ruleIdstringThe rule id. Matched case-insensitively.
GetAllByRuleId(string)
Gets all mappings belonging to the given rule.
public virtual IEnumerable<ProductAssignmentRuleMappingItem> GetAllByRuleId(string ruleId)
Parameters
ruleIdstringThe rule id. Matched case-insensitively.
Returns
GetAllMappings()
Gets all rule mappings.
public virtual IEnumerable<ProductAssignmentRuleMappingItem> GetAllMappings()
Returns
GetById(string)
Gets a rule mapping by its id.
public virtual ProductAssignmentRuleMappingItem? GetById(string mappingId)
Parameters
mappingIdstringThe mapping id.
Returns
- ProductAssignmentRuleMappingItem
The matching ProductAssignmentRuleMappingItem, or
nullif nothing was found.
Save(ProductAssignmentRuleMappingItem)
Saves a rule mapping to the database.
public virtual void Save(ProductAssignmentRuleMappingItem item)
Parameters
itemProductAssignmentRuleMappingItemThe mapping to create or update.
Exceptions
- ArgumentNullException
Thrown when
itemisnull.
SetCacheType<TObjectCache>()
Changes the storage container
public virtual void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, ProductAssignmentRuleMappingItem>
Type Parameters
TObjectCache