@ProviderType
public interface ClassificationManager
ClassificationManager provides methods to retrieve, update, create and
update product classifications.
Since 6.2| Modifier and Type | Method and Description |
|---|---|
ClassificationAttribute |
addAttribute(java.lang.String categoryPath,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> properties)
Adds an attribute to the specified category.
|
ClassificationCategory |
addCategory(java.lang.String parentPath,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> properties)
Adds a sub category to the specified category.
|
ClassificationCategory |
addRootCategory(java.lang.String classificationPath,
java.util.Map<java.lang.String,java.lang.Object> properties)
Adds a root category to the classification.
|
void |
assignProducts(java.lang.String categoryPath,
java.util.Map<java.lang.String,java.lang.Object> productListDefinition)
Assigns products to the category.
|
Classification |
createClassification(java.lang.String parentPath,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> properties)
Creates a product classification with a given name under the
parentPath. |
ClassificationAttribute |
getAttribute(java.lang.String path)
Returns a classification attribute for the given
path or an ID
uniquely identifying the ClassificationAttribute to the external commerce engine. |
ClassificationCategory |
getCategory(java.lang.String path)
Returns a classification category for the given
path or an ID
uniquely identifying the ClassificationCategory to the external commerce engine. |
Classification |
getClassification(java.lang.String path)
Returns a product classification for the given
path or an ID
uniquely identifying the Classification to the external commerce engine. |
java.util.Collection<ClassificationCategory> |
getClassificationCategories(java.util.List<Product> products)
Retrieves the classification categories in which at least one of the product is assigned.
|
java.util.Collection<ClassificationCategory> |
getClassificationCategories(Product product)
Retrieves the classification categories in which the product is assigned.
|
java.util.Collection<Classification> |
getClassifications(java.util.List<Product> products)
Retrieves the classifications in which at least one of the product is assigned.
|
java.util.Collection<Classification> |
getClassifications(Product product)
Retrieves the classifications in which the product is assigned.
|
void |
orderBefore(java.lang.String srcAttributePath,
java.lang.String destAttributePath)
Inserts the referenced attribute
srcAttributePath into the list of attributes at the position
immediately before the referenced attribute destAttributePath. |
void |
removeAttribute(java.lang.String path)
Removes the attribute.
|
void |
removeCategory(java.lang.String path)
Removes the category.
|
void |
removeClassification(java.lang.String path)
Removes the classification.
|
void |
updateAttribute(java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> properties)
Updates the attribute.
|
void |
updateCategory(java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> properties)
Updates the category.
|
void |
updateClassification(java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> properties)
Updates the classification.
|
Classification getClassification(java.lang.String path)
path or an ID
uniquely identifying the Classification to the external commerce engine.
It returns null if given path/ID is not a product classification or is not definedpath - path/ID that represents the classificationClassification representing the classification.ClassificationCategory getCategory(java.lang.String path)
path or an ID
uniquely identifying the ClassificationCategory to the external commerce engine.
It returns null if given path/ID is not a classification category or is not definedpath - path/ID that represents the categoryClassificationCategory representing the category.ClassificationAttribute getAttribute(java.lang.String path)
path or an ID
uniquely identifying the ClassificationAttribute to the external commerce engine.
It returns null if given path/ID is not a classification attribute or is not definedpath - path/ID that represents the attributeClassificationAttribute representing the attribute.Classification createClassification(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 classification needs to be created.name - The name for classification.properties - The additional data for product classificationClassification representing the created classification.CommerceException - if the classification was not createdvoid removeClassification(java.lang.String path)
throws CommerceException
path - path/ID that represents the classificationCommerceException - if the classification was not removedvoid updateClassification(java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> properties)
throws CommerceException
path - path/ID that represents the classificationproperties - The additional data for product classificationCommerceException - if the classification was not updatedClassificationCategory addRootCategory(java.lang.String classificationPath, java.util.Map<java.lang.String,java.lang.Object> properties) throws CommerceException
classificationPath - path/ID that represents the classificationproperties - The additional data for the root categoryClassificationCategory representing the created category.CommerceException - if the root category was not created
or if the classification already has a root categoryClassificationCategory addCategory(java.lang.String parentPath, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> properties) throws CommerceException
parentPath - parent path / ID that represents the parent categoryproperties - The additional data for the categoryClassificationCategory representing the created category.CommerceException - if the category was not createdvoid removeCategory(java.lang.String path)
throws CommerceException
path - path/ID that represents the categoryCommerceException - if the category was not removedvoid updateCategory(java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> properties)
throws CommerceException
path - path/ID that represents the categoryproperties - The additional data for the categoryCommerceException - if the category was not updatedClassificationAttribute addAttribute(java.lang.String categoryPath, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> properties) throws CommerceException
categoryPath - path/ID that represents the categoryproperties - The additional data for the attributeClassificationAttribute representing the created attribute.CommerceException - if the attribute was not createdvoid removeAttribute(java.lang.String path)
throws CommerceException
path - path/ID that represents the attributeCommerceException - if the attribute was not removedvoid updateAttribute(java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> properties)
throws CommerceException
path - path/ID that represents the attributeproperties - The additional data for the attributeCommerceException - if the attribute was not updatedvoid orderBefore(java.lang.String srcAttributePath,
java.lang.String destAttributePath)
throws CommerceException
srcAttributePath into the list of attributes at the position
immediately before the referenced attribute destAttributePath.
To insert the referenced attribute into last position, destAttributePath can be null.srcAttributePath - Referenced attribute path/ID that needs to be moved in the orderdestAttributePath - Referenced attribute path/ID before which the srcAttributePath will be placed.CommerceException - if the operation failsvoid assignProducts(java.lang.String categoryPath,
java.util.Map<java.lang.String,java.lang.Object> productListDefinition)
throws CommerceException
categoryPath - path/ID that represents the categoryproductListDefinition - A map of properties (key-value pairs) defining a set of products
(can be used e.g. to define a query or a tag-based search)CommerceException - if the operation failedjava.util.Collection<Classification> getClassifications(Product product)
product - The productClassifications in which the product is assigned.java.util.Collection<ClassificationCategory> getClassificationCategories(Product product)
product - The productClassificationCategorys in which the product is assigned.java.util.Collection<Classification> getClassifications(java.util.List<Product> products)
products - The list of productsClassifications in which the products are assigned.java.util.Collection<ClassificationCategory> getClassificationCategories(java.util.List<Product> products)
products - The list of productsClassificationCategorys in which the products are assigned.Copyright © 2010 - 2023 Adobe. All Rights Reserved