Class AssortmentService
- Namespace
- Dynamicweb.Ecommerce.Assortments
- Assembly
- Dynamicweb.Ecommerce.dll
public class AssortmentService : ICacheStorage<string, Assortment>, ICacheStorage<string>, ICacheStorage
- Inheritance
-
AssortmentService
- Implements
- Inherited Members
Properties
Info
Information about the object cache
public CacheInformation Info { get; }
Property Value
Methods
BuildAssortment(Assortment)
Starts the assortment building.
public virtual void BuildAssortment(Assortment assortment)
Parameters
assortment
AssortmentThe assortment object.
ClearCache()
Resets all keys to the default value for objects stored in the object cache
public void ClearCache()
ClearCache(IEnumerable<string>)
Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<string> key)
Parameters
key
IEnumerable<string>
ClearCache(string)
Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(string key)
Parameters
key
stringKey to reset
DeleteAssortment(Assortment)
Deletes the Assortment and all its items, relations and permissions.
public void DeleteAssortment(Assortment assortment)
Parameters
assortment
AssortmentThe assortment object.
DeleteAssortmentItem(AssortmentItem)
Deletes the AssortmentItem
public virtual void DeleteAssortmentItem(AssortmentItem assortmentItem)
Parameters
assortmentItem
AssortmentItemThe assortment item object.
DeleteAssortmentItems(Assortment)
Deletes the assortment items.
public virtual void DeleteAssortmentItems(Assortment assortment)
Parameters
assortment
AssortmentThe assortment object.
DeleteAssortmentItems(IEnumerable<AssortmentItem>)
Deletes the assortment items.
public virtual void DeleteAssortmentItems(IEnumerable<AssortmentItem> assortmentItems)
Parameters
assortmentItems
IEnumerable<AssortmentItem>The assortment items collection.
DeleteAssortmentItems(string)
Deletes the assortment items.
public virtual void DeleteAssortmentItems(string assortmentId)
Parameters
assortmentId
stringThe assortment ID.
DeleteAssortmentPermission(AssortmentPermission)
Deletes the AssortmentPermission.
public virtual void DeleteAssortmentPermission(AssortmentPermission assortmentPermission)
Parameters
assortmentPermission
AssortmentPermissionThe assortment permission object.
DeleteAssortmentRelation(AssortmentRelation)
Deletes the AssortmentRelation.
public virtual void DeleteAssortmentRelation(AssortmentRelation assortmentRelation)
Parameters
assortmentRelation
AssortmentRelationThe assortment relation object.
DeleteAssortmentRelations(Assortment)
Deletes the assortment relations.
public virtual void DeleteAssortmentRelations(Assortment assortment)
Parameters
assortment
AssortmentThe assortment object.
DeleteAssortmentRelations(IEnumerable<AssortmentRelation>)
Deletes the assortment relations.
public virtual void DeleteAssortmentRelations(IEnumerable<AssortmentRelation> assortmentRelations)
Parameters
assortmentRelations
IEnumerable<AssortmentRelation>The collection of the assortment relations.
DeleteGroupAssortmentRelations(Assortment, string)
Deletes the group assortment relations.
public virtual void DeleteGroupAssortmentRelations(Assortment assortment, string groupId)
Parameters
assortment
AssortmentThe assortment object.
groupId
stringThe group ID.
DeleteGroupAssortmentRelations(IEnumerable<AssortmentGroupRelation>)
Deletes the group assortment relations.
public virtual void DeleteGroupAssortmentRelations(IEnumerable<AssortmentGroupRelation> assortmentRelations)
Parameters
assortmentRelations
IEnumerable<AssortmentGroupRelation>The group assortment relations collection.
DeleteProductAssortmentRelations(Assortment, string, string)
Deletes the product assortment relations.
public virtual void DeleteProductAssortmentRelations(Assortment assortment, string productId, string productVariantId)
Parameters
assortment
AssortmentThe assortment object.
productId
stringThe product ID.
productVariantId
stringThe product variant ID.
DeleteProductAssortmentRelations(IEnumerable<AssortmentProductRelation>)
Deletes the product assortment relations.
public virtual void DeleteProductAssortmentRelations(IEnumerable<AssortmentProductRelation> assortmentRelations)
Parameters
assortmentRelations
IEnumerable<AssortmentProductRelation>The product assortment relations collection.
DeleteShopAssortmentRelations(Assortment, string)
Deletes the assortment relations.
public virtual void DeleteShopAssortmentRelations(Assortment assortment, string shopId)
Parameters
assortment
AssortmentThe assortment object.
shopId
stringThe shop ID.
DeleteShopAssortmentRelations(IEnumerable<AssortmentShopRelation>)
Deletes the shop assortment relations.
public virtual void DeleteShopAssortmentRelations(IEnumerable<AssortmentShopRelation> assortmentRelations)
Parameters
assortmentRelations
IEnumerable<AssortmentShopRelation>The shop assortment relations collection.
FlagAssortmentForRebuild(Assortment)
Flags the assortment for rebuild.
public virtual void FlagAssortmentForRebuild(Assortment assortment)
Parameters
assortment
AssortmentThe assortment object.
GetActiveAssortmentIds()
Gets the IDs of the active assortments.
public virtual IEnumerable<string> GetActiveAssortmentIds()
Returns
- IEnumerable<string>
A collection of the assortment IDs.
GetActiveAssortments()
Gets all active assortments.
public virtual IEnumerable<Assortment> GetActiveAssortments()
Returns
- IEnumerable<Assortment>
A collection of the Assortment.
GetAllAssortments()
Gets all assortments.
public virtual IEnumerable<Assortment> GetAllAssortments()
Returns
- IEnumerable<Assortment>
A collection of the Assortment.
GetAllowAnonymousUsersAssortmentIds()
Gets the ids of all active assortments for the current language that are available to anonymous uses.
public virtual IEnumerable<string> GetAllowAnonymousUsersAssortmentIds()
Returns
- IEnumerable<string>
A collection of the assortment IDs.
GetAssortmentById(string)
Gets the Assortment by ID.
public virtual Assortment GetAssortmentById(string assortmentId)
Parameters
assortmentId
stringThe assortment ID.
Returns
- Assortment
The Assortment.
GetAssortmentIdsByUser(User, bool)
Gets the assortment IDs by user.
public virtual IEnumerable<string> GetAssortmentIdsByUser(User user, bool onlyActive)
Parameters
Returns
- IEnumerable<string>
A collection of the assortment IDs.
GetAssortmentPermissionsByUser(User, bool)
Gets the assortment permission for user.
public virtual IEnumerable<AssortmentPermission> GetAssortmentPermissionsByUser(User user, bool includeGroups)
Parameters
user
UserThe user.
includeGroups
boolDetermines whether assortment permissions for user groups should be included in result collection.
Returns
- IEnumerable<AssortmentPermission>
A collection of the AssortmentPermission.
GetAssortmentRelationsByGroupId(string)
Gets the assortment relations by group ID.
public virtual IEnumerable<AssortmentGroupRelation> GetAssortmentRelationsByGroupId(string groupId)
Parameters
groupId
stringThe group ID.
Returns
- IEnumerable<AssortmentGroupRelation>
A collection of the AssortmentGroupRelation.
GetAssortmentRelationsByProductId(string, string)
Gets the assortment relations by product ID.
public virtual IEnumerable<AssortmentProductRelation> GetAssortmentRelationsByProductId(string productId, string productVariantId)
Parameters
Returns
- IEnumerable<AssortmentProductRelation>
A collection of the AssortmentProductRelation.
GetAssortmentRelationsByShopId(string)
Gets the assortment relations by shop ID.
public virtual IEnumerable<AssortmentShopRelation> GetAssortmentRelationsByShopId(string shopId)
Parameters
shopId
stringThe shop ID.
Returns
- IEnumerable<AssortmentShopRelation>
A collection of the AssortmentShopRelation.
GetAssortmentsByProduct(Product)
Gets the assortments by product.
public virtual IEnumerable<Assortment> GetAssortmentsByProduct(Product product)
Parameters
product
ProductThe product object.
Returns
- IEnumerable<Assortment>
A collection of the Assortment.
GetAssortmentsByProductId(string, string, string)
Gets the assortments by product ID.
public virtual IEnumerable<Assortment> GetAssortmentsByProductId(string productId, string variantId, string languageId)
Parameters
Returns
- IEnumerable<Assortment>
A collection of the Assortment.
GetAssortmentsForBuild()
Gets assortments which require build.
public virtual IEnumerable<Assortment> GetAssortmentsForBuild()
Returns
- IEnumerable<Assortment>
A collection of the Assortment.
GetNotActiveAssortmentIds()
Gets the IDs of the not active assortments.
public virtual IEnumerable<string> GetNotActiveAssortmentIds()
Returns
- IEnumerable<string>
A collection of the assortment IDs.
HasAccessToProduct(Product, User)
public virtual bool HasAccessToProduct(Product product, User user)
Parameters
Returns
HasActiveAssortments()
Determines whether there are active assortments.
public virtual bool HasActiveAssortments()
Returns
- bool
True
, if solution have one or more active assortments, otherwiseFalse
.
LoadAssortmentGroupRelations(string)
public virtual Dictionary<string, AssortmentGroupRelation> LoadAssortmentGroupRelations(string assortmentId)
Parameters
assortmentId
string
Returns
LoadAssortmentPermissions(string)
public virtual Dictionary<int, AssortmentPermission> LoadAssortmentPermissions(string assortmentId)
Parameters
assortmentId
string
Returns
LoadAssortmentProductRelations(string)
public virtual Dictionary<string, AssortmentProductRelation> LoadAssortmentProductRelations(string assortmentId)
Parameters
assortmentId
string
Returns
LoadAssortmentShopRelations(string)
public virtual Dictionary<string, AssortmentShopRelation> LoadAssortmentShopRelations(string assortmentId)
Parameters
assortmentId
string
Returns
MoveAssortments(IEnumerable<ProductVariantMoveSetting>)
public virtual void MoveAssortments(IEnumerable<ProductVariantMoveSetting> moveSettings)
Parameters
moveSettings
IEnumerable<ProductVariantMoveSetting>
SaveAssortment(Assortment, bool)
Saves the Assortment.
public virtual void SaveAssortment(Assortment assortment, bool doInstallStep = true)
Parameters
assortment
AssortmentThe assortment object.
doInstallStep
bool
SaveAssortmentItem(AssortmentItem)
Saves the AssortmentItem.
public virtual void SaveAssortmentItem(AssortmentItem assortmentItem)
Parameters
assortmentItem
AssortmentItemThe assortment item object.
SaveAssortmentPermission(AssortmentPermission)
Saves the AssortmentPermission.
public virtual void SaveAssortmentPermission(AssortmentPermission assortmentPermission)
Parameters
assortmentPermission
AssortmentPermissionThe assortment permission object.
SaveAssortmentRelation(AssortmentRelation)
Saves the AssortmentRelation.
public virtual void SaveAssortmentRelation(AssortmentRelation assortmentRelation)
Parameters
assortmentRelation
AssortmentRelationThe assortment relation object.