public class URLGeneratorTransformer extends StringConcatTransformer
StringConcatTransformer used to generate URLs.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
paramsAdded |
protected boolean |
usePathAsParams
If true will assume to join /../../ in Path Style
|
filter, processors| Constructor and Description |
|---|
URLGeneratorTransformer() |
URLGeneratorTransformer(List processors) |
URLGeneratorTransformer(Object base,
Object params) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
addAnalyticsParams(Object input,
String url)
Add analytic params (not affected by
secureURL(Object, String)) |
protected String |
decorateURL(Object input,
String url)
Any stuff to add on the URL
|
boolean |
isParamsAdded() |
boolean |
isUsePathAsParams()
If true will assume to join /../../ in Path Style
|
protected String |
joinDelimet(String result,
Object processor,
boolean hasNext)
In Join operations it maybe desired a delimeter is needed between joins of two
JoinTransformer.processors in sequence. |
protected String |
secureURL(Object input,
String url)
Override to secure url params
|
void |
setParamsAdded(boolean paramsAdded) |
void |
setProcessors(List processors) |
void |
setUsePathAsParams(boolean usePathAsParams)
If true will assume to join /../../ in Path Style
|
Object |
transform(Object input)
|
cleanDangligngDelimets, getDanglingDelimRegEx, getDelimiter, join, setDanglingDelimRegEx, setDelimitergetFilter, getProcessors, setFilterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyprotected boolean paramsAdded
protected boolean usePathAsParams
public URLGeneratorTransformer()
public URLGeneratorTransformer(List processors)
public URLGeneratorTransformer(Object base, Object params)
base - as a static String or a Transformer capable of generating the base path from inputparams - as a static String of URL params or a Transformer capable of generating the parameters key value pairs from the inputpublic void setProcessors(List processors)
setProcessors in class JoinTransformer<String>protected String secureURL(Object input, String url) throws Exception
Exceptionprotected String decorateURL(Object input, String url) throws Exception
Exceptionprotected String addAnalyticsParams(Object input, String url) throws Exception
secureURL(Object, String))input - as Objecturl - as StringExceptionpublic Object transform(Object input)
secureURL(Object, String) then decorateURL(Object, String) and then addAnalyticsParams(Object, String)transform in interface org.apache.commons.collections.Transformertransform in class JoinTransformer<String>protected String joinDelimet(String result, Object processor, boolean hasNext)
JoinTransformerJoinTransformer.processors in sequence.joinDelimet in class StringConcatTransformerresult - as T so far of all joinsprocessor - as type T or TransformerhasNext - as boolean (if there are any more processors in the chain). If false the current processor is the last.
Note: If a JoinTransformer.filter is defined; hasNext cannot factor the next in the chain will be part of result or not.
However, if there are any dangling delims left JoinTransformer.cleanDangligngDelimets(Object) can be defined.public boolean isParamsAdded()
public void setParamsAdded(boolean paramsAdded)
public boolean isUsePathAsParams()
public void setUsePathAsParams(boolean usePathAsParams)
Copyright © 2018. All rights reserved.