@ProviderType
public interface ProductCollectionManager
ProductCollectionManager defines the API to get, create and delete
product collections ProductCollection.
A ProductCollectionManager can be adapted from a ResourceResolver.| Modifier and Type | Method and Description |
|---|---|
ProductCollection |
createCollection(java.lang.String parentPath,
java.lang.String name)
Creates a product collection with a given name under the
parentPath. |
ProductCollection |
createCollection(java.lang.String parentPath,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> properties)
This method creates a product collection with a given name under the
parentPath. |
void |
deleteCollection(ProductCollection collection)
Removes the
ProductCollection. |
ProductCollection |
getCollection(java.lang.String path)
Returns a product collection for the given
path or an ID
uniquely identifying the ProductCollection to the external commerce engine. |
java.util.Iterator<ProductCollection> |
getProductCollections(Product product)
Returns the product collections that reference a
product. |
void |
updateCollection(ProductCollection collection,
java.util.Map<java.lang.String,java.lang.Object> properties)
Updates the
ProductCollection. |
java.util.Iterator<ProductCollection> getProductCollections(Product product)
product.product - Iterator over the ProductCollections referencing the product.ProductCollection getCollection(java.lang.String path)
path or an ID
uniquely identifying the ProductCollection to the external commerce engine.
It returns null if given path/ID is not a product collection or is not definedpath - path/ID that represents the collectionProductCollection representing the collection.ProductCollection createCollection(java.lang.String parentPath, java.lang.String name) throws CommerceException
parentPath.parentPath - parent path where collection needs to be created.name - The name for collection.ProductCollection representing the created collection.CommerceException - if the collection was not createdProductCollection createCollection(java.lang.String parentPath, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> properties) throws CommerceException
parentPath.parentPath - parent path where collection needs to be created.name - The name for collection.properties - The additional data for product collectionProductCollection representing the created collection.CommerceException - if the collection was not createdvoid updateCollection(ProductCollection collection, java.util.Map<java.lang.String,java.lang.Object> properties) throws CommerceException
ProductCollection.collection - the collection to be updated.properties - The additional data for product collectionCommerceException - if the collection was not updatedvoid deleteCollection(ProductCollection collection) throws CommerceException
ProductCollection.collection - the collection to be deleted.CommerceException - if the collection was not deletedCopyright © 2010 - 2023 Adobe. All Rights Reserved