public abstract class CategoryProductPagePathTransformer<P extends Product> extends ProductPagePathTransformer
ProductPagePathTransformer
that will check if the product is a category or product using isCategory(Product)
.categoryPath
is provided it will use that and visa-versa if its a product.
isCategory(Product)
is left abstract.contentPathTransformer, levelpathMap, namePathMap, pathDynamicKeyGenerator
Constructor and Description |
---|
CategoryProductPagePathTransformer() |
Modifier and Type | Method and Description |
---|---|
String |
getCategoryPath() |
String |
getProductPath() |
protected abstract boolean |
isCategory(P p)
If it returns true, it will assume it to be a category (menu-item has children and hence cannot be a link itself by default def.)
|
void |
setCategoryPath(String categoryPath) |
void |
setProductPath(String productPath) |
Object |
transform(Object input)
Returns a path or null (if the Item is not supposed to link and just serve as a category)
|
getContentPathTransformer, getLevelpathMap, getNamePathMap, getPathDynamicKeyGenerator, setContentPathTransformer, setLevelpathMap, setNamePathMap, setPathDynamicKeyGenerator
protected abstract boolean isCategory(P p)
public Object transform(Object input)
HierarchicalPagePathTransformer
transform
in interface org.apache.commons.collections.Transformer
transform
in class HierarchicalPagePathTransformer
public String getProductPath()
public void setProductPath(String productPath)
public String getCategoryPath()
public void setCategoryPath(String categoryPath)
Copyright © 2018. All rights reserved.