Class AssortmentService
- Namespace
- Dynamicweb.Ecommerce.Assortments
- Assembly
- Dynamicweb.Ecommerce.dll
public class AssortmentService : ICacheStorage<string, Assortment>, ICacheStorage<string>, ICacheStorage
- Inheritance
-
Assortment
Service
- Implements
- Inherited Members
Properties
Info
Information about the object cache
Property Value
Methods
BuildAssortment(Assortment)
Starts the assortment building.
Parameters
assortment
AssortmentThe assortment object.
ClearCache()
Resets all keys to the default value for objects stored in the object cache
ClearCache(IEnumerable<string>)
Resets the specified keys to the default value for objects stored in the object cache
Parameters
key
IEnumerable<string>
ClearCache(string)
Resets the specified key to the default value for objects stored in the object cache
Parameters
key
stringKey to reset
DeleteAssortment(Assortment)
Deletes the Assortment and all its items, relations and permissions.
Parameters
assortment
AssortmentThe assortment object.
DeleteAssortmentItem(AssortmentItem)
Deletes the Assortment
Parameters
assortmentItem
AssortmentItem The assortment item object.
DeleteAssortmentItems(Assortment)
Deletes the assortment items.
Parameters
assortment
AssortmentThe assortment object.
DeleteAssortmentItems(IEnumerable<AssortmentItem>)
Deletes the assortment items.
Parameters
assortmentItems
IEnumerable<AssortmentItem >The assortment items collection.
DeleteAssortmentItems(string)
Deletes the assortment items.
Parameters
assortmentId
stringThe assortment ID.
DeleteAssortmentPermission(AssortmentPermission)
Deletes the Assortment
Parameters
assortmentPermission
AssortmentPermission The assortment permission object.
DeleteAssortmentRelation(AssortmentRelation)
Deletes the Assortment
Parameters
assortmentRelation
AssortmentRelation The assortment relation object.
DeleteAssortmentRelations(Assortment)
Deletes the assortment relations.
Parameters
assortment
AssortmentThe assortment object.
DeleteAssortmentRelations(IEnumerable<AssortmentRelation>)
Deletes the assortment relations.
Parameters
assortmentRelations
IEnumerable<AssortmentRelation >The collection of the assortment relations.
DeleteGroupAssortmentRelations(Assortment, string)
Deletes the group assortment relations.
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<AssortmentGroup >Relation 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<AssortmentProduct >Relation The product assortment relations collection.
DeleteShopAssortmentRelations(Assortment, string)
Deletes the assortment relations.
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<AssortmentShop >Relation The shop assortment relations collection.
FlagAssortmentForRebuild(Assortment)
Flags the assortment for rebuild.
Parameters
assortment
AssortmentThe assortment object.
GetActiveAssortmentIds()
Gets the IDs of the active assortments.
Returns
- IEnumerable<string>
A collection of the assortment IDs.
GetActiveAssortments()
Gets all active assortments.
Returns
- IEnumerable<Assortment>
A collection of the Assortment.
GetAllAssortments()
Gets all assortments.
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.
Returns
- IEnumerable<string>
A collection of the assortment IDs.
GetAssortmentById(string)
Gets the Assortment by ID.
Parameters
assortmentId
stringThe assortment ID.
Returns
- Assortment
The Assortment.
GetAssortmentIdsByUser(User, bool)
Gets the assortment IDs by user.
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<Assortment
Permission > A collection of the Assortment
Permission .
GetAssortmentRelationsByGroupId(string)
Gets the assortment relations by group ID.
Parameters
groupId
stringThe group ID.
Returns
- IEnumerable<Assortment
Group >Relation A collection of the Assortment
Group .Relation
GetAssortmentRelationsByProductId(string, string)
Gets the assortment relations by product ID.
public virtual IEnumerable<AssortmentProductRelation> GetAssortmentRelationsByProductId(string productId, string productVariantId)
Parameters
Returns
- IEnumerable<Assortment
Product >Relation A collection of the Assortment
Product .Relation
GetAssortmentRelationsByShopId(string)
Gets the assortment relations by shop ID.
Parameters
shopId
stringThe shop ID.
Returns
- IEnumerable<Assortment
Shop >Relation A collection of the Assortment
Shop .Relation
GetAssortmentsByProduct(Product)
Gets the assortments by product.
Parameters
product
ProductThe product object.
Returns
- IEnumerable<Assortment>
A collection of the Assortment.
GetAssortmentsByProductId(string, string)
Gets the assortments by product ID.
public virtual IEnumerable<Assortment> GetAssortmentsByProductId(string productId, string variantId)
Parameters
Returns
- IEnumerable<Assortment>
A collection of the Assortment.
GetAssortmentsForBuild()
Gets assortments which require build.
Returns
- IEnumerable<Assortment>
A collection of the Assortment.
GetNotActiveAssortmentIds()
Gets the IDs of the not active assortments.
Returns
- IEnumerable<string>
A collection of the assortment IDs.
HasAccessToProduct(Product, User)
Parameters
Returns
HasActiveAssortments()
Determines whether there are active assortments.
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)
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>)
Parameters
moveSettings
IEnumerable<ProductVariant >Move Setting
SaveAssortment(Assortment, bool)
Saves the Assortment.
Parameters
assortment
AssortmentThe assortment object.
doInstallStep
bool
SaveAssortmentItem(AssortmentItem)
Saves the Assortment
Parameters
assortmentItem
AssortmentItem The assortment item object.
SaveAssortmentPermission(AssortmentPermission)
Saves the Assortment
Parameters
assortmentPermission
AssortmentPermission The assortment permission object.
SaveAssortmentRelation(AssortmentRelation)
Saves the Assortment
Parameters
assortmentRelation
AssortmentRelation The assortment relation object.