public class ProductURLGeneratorTransformer<P extends Product> extends WicketURLGeneratorTransformer
Transformer
that accepts Product Id/sku or any identifier that productFetch
accepts or Product
and produces a Link for it.idParamName
part of the URL is encoded in UTF-8
TODO: Add Unit test caseModifier and Type | Field and Description |
---|---|
protected String |
idFieldName |
protected String |
idParamName |
protected org.apache.commons.collections.Transformer |
productFetch
Convert a Product Id to a
Product |
protected ProductService<P> |
productService |
secureURLUsingSalt
paramsAdded, usePathAsParams
filter, processors
Constructor and Description |
---|
ProductURLGeneratorTransformer() |
ProductURLGeneratorTransformer(Class<org.apache.wicket.Page> base) |
ProductURLGeneratorTransformer(ProductURLGeneratorTransformer t,
ProductService<P> productService)
Allow to create a submit transformer from a ReadOnly (display) version or visa versa.
|
Modifier and Type | Method and Description |
---|---|
protected String |
cleanAndValidate(String url) |
protected String |
decorateURL(Object input,
String url)
Any stuff to add on the URL
|
org.apache.commons.collections.Transformer |
getCollectionFetch()
Convert a Collection Id to a
Product |
String |
getIdFieldName() |
String |
getIdParamName() |
ProductService<P> |
getProductService() |
void |
setCollectionFetch(org.apache.commons.collections.Transformer collectionFetch)
Convert a Collection Id to a
Product |
void |
setIdFieldName(String idFieldName) |
void |
setIdParamName(String idParamName) |
void |
setProductService(ProductService<P> productService) |
Object |
transform(Object input)
|
getBaseUrlStr, getProtocolStrict, getUrlFormat, getWwwStrict, initWithRequestCycle, isAbsolute, isSecureURLUsingSalt, secureURL, setAbsolute, setBaseUrlStr, setProtocolStrict, setSecureURLUsingSalt, setUrlFormat, setWwwStrict
addAnalyticsParams, isParamsAdded, isUsePathAsParams, joinDelimet, setParamsAdded, setProcessors, setUsePathAsParams
cleanDangligngDelimets, getDanglingDelimRegEx, getDelimiter, join, setDanglingDelimRegEx, setDelimiter
getFilter, getProcessors, setFilter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
protected org.apache.commons.collections.Transformer productFetch
Product
protected ProductService<P extends Product> productService
protected String idParamName
protected String idFieldName
public ProductURLGeneratorTransformer()
public ProductURLGeneratorTransformer(Class<org.apache.wicket.Page> base)
public ProductURLGeneratorTransformer(ProductURLGeneratorTransformer t, ProductService<P> productService) throws Exception
Exception
protected String decorateURL(Object input, String url)
URLGeneratorTransformer
decorateURL
in class URLGeneratorTransformer
public Object transform(Object input)
URLGeneratorTransformer
URLGeneratorTransformer.secureURL(Object, String)
then URLGeneratorTransformer.decorateURL(Object, String)
and then URLGeneratorTransformer.addAnalyticsParams(Object, String)
transform
in interface org.apache.commons.collections.Transformer
transform
in class WicketURLGeneratorTransformer
public org.apache.commons.collections.Transformer getCollectionFetch()
Product
public void setCollectionFetch(org.apache.commons.collections.Transformer collectionFetch)
Product
public ProductService<P> getProductService()
public void setProductService(ProductService<P> productService)
public String getIdParamName()
public void setIdParamName(String idParamName)
public String getIdFieldName()
public void setIdFieldName(String idFieldName)
Copyright © 2018. All rights reserved.