public class HierarchicalPagePathTransformer<T extends IHierarchialReference> extends Object implements org.apache.commons.collections.Transformer
HierarchialDomainObject
or Object[name,hierarchy,...] or String[name,hierarchy,...] and gives a corresponding Path as output
levelpathMap
specific Where each level will point to. One can also provide Special catch/generic keys (<=0) to encompass
general use cases & defaults.
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.collections.Transformer |
contentPathTransformer
If there is a name from raw data, ensure its converted to a proper formal suitable to be a link/URL
|
protected Map<Integer,String> |
levelpathMap
For every level maintain a Prefix Path that will be appended to the product name
A product @ root level is 1; 1_1 (level 2) etc. |
protected Map<?,String> |
namePathMap
Specific paths for specific
#fieldName . |
protected org.apache.commons.collections.Transformer |
pathDynamicKeyGenerator
Use this to derive the dynamic aspect of the Path from the input type T, which is expected to not be null
Override to derive any value of choice |
Constructor and Description |
---|
HierarchicalPagePathTransformer() |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.collections.Transformer |
getContentPathTransformer()
If there is a name from raw data, ensure its converted to a proper formal suitable to be a link/URL
|
Map<Integer,String> |
getLevelpathMap()
For every level maintain a Prefix Path that will be appended to the product name
A product @ root level is 1; 1_1 (level 2) etc. |
Map<?,String> |
getNamePathMap()
Specific paths for specific
#fieldName . |
org.apache.commons.collections.Transformer |
getPathDynamicKeyGenerator()
Use this to derive the dynamic aspect of the Path from the input type T, which is expected to not be null
Override to derive any value of choice |
void |
setContentPathTransformer(org.apache.commons.collections.Transformer contentPathTransformer)
If there is a name from raw data, ensure its converted to a proper formal suitable to be a link/URL
|
void |
setLevelpathMap(Map<Integer,String> levelpathMap)
For every level maintain a Prefix Path that will be appended to the product name
A product @ root level is 1; 1_1 (level 2) etc. |
void |
setNamePathMap(Map<?,String> namePathMap)
Specific paths for specific
#fieldName . |
void |
setPathDynamicKeyGenerator(org.apache.commons.collections.Transformer pathDynamicKeyGenerator)
Use this to derive the dynamic aspect of the Path from the input type T, which is expected to not be null
Override to derive any value of choice |
Object |
transform(Object input)
Returns a path or null (if the Item is not supposed to link and just serve as a category)
|
protected Map<Integer,String> levelpathMap
protected Map<?,String> namePathMap
#fieldName
. The literal value of this is what is the returned literal pathlevelpathMap
protected org.apache.commons.collections.Transformer contentPathTransformer
protected org.apache.commons.collections.Transformer pathDynamicKeyGenerator
#getValueForFieldName(IHierarchialReference)}
IHierarchialReference.getName()
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public Map<Integer,String> getLevelpathMap()
public void setLevelpathMap(Map<Integer,String> levelpathMap)
public org.apache.commons.collections.Transformer getContentPathTransformer()
public void setContentPathTransformer(org.apache.commons.collections.Transformer contentPathTransformer)
public Map<?,String> getNamePathMap()
#fieldName
. The literal value of this is what is the returned literal pathlevelpathMap
public void setNamePathMap(Map<?,String> namePathMap)
#fieldName
. The literal value of this is what is the returned literal pathlevelpathMap
public org.apache.commons.collections.Transformer getPathDynamicKeyGenerator()
getValueForFieldName
IHierarchialReference.getName()
public void setPathDynamicKeyGenerator(org.apache.commons.collections.Transformer pathDynamicKeyGenerator)
getValueForFieldName
IHierarchialReference.getName()
Copyright © 2018. All rights reserved.