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 case| Modifier 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 |
secureURLUsingSaltparamsAdded, usePathAsParamsfilter, 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, setWwwStrictaddAnalyticsParams, isParamsAdded, isUsePathAsParams, joinDelimet, setParamsAdded, setProcessors, setUsePathAsParamscleanDangligngDelimets, getDanglingDelimRegEx, getDelimiter, join, setDanglingDelimRegEx, setDelimitergetFilter, getProcessors, setFilterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyprotected org.apache.commons.collections.Transformer productFetch
Productprotected 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
Exceptionprotected String decorateURL(Object input, String url)
URLGeneratorTransformerdecorateURL in class URLGeneratorTransformerpublic Object transform(Object input)
URLGeneratorTransformerURLGeneratorTransformer.secureURL(Object, String) then URLGeneratorTransformer.decorateURL(Object, String) and then URLGeneratorTransformer.addAnalyticsParams(Object, String)transform in interface org.apache.commons.collections.Transformertransform in class WicketURLGeneratorTransformerpublic org.apache.commons.collections.Transformer getCollectionFetch()
Productpublic void setCollectionFetch(org.apache.commons.collections.Transformer collectionFetch)
Productpublic 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.