public class WicketURLGeneratorTransformer extends URLGeneratorTransformer implements UsesRequestCycle, Serializable
URLGeneratorTransformer
where the base path can be generated using the Wicket Page Class name.
RequestCycle
to generate the baseUrlStr
; for situations where there is no RequestCycle
available
as a hack, utilize UsesRequestCycle.initWithRequestCycle(RequestCycle)
RequestCycle
(Wicket 5+ may have the answer). Look for it in the upgrade!
UsesRequestCycle
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected boolean |
secureURLUsingSalt
Appends a parameter called salt.
|
paramsAdded, usePathAsParams
filter, processors
Constructor and Description |
---|
WicketURLGeneratorTransformer() |
WicketURLGeneratorTransformer(Class<org.apache.wicket.Page> base) |
WicketURLGeneratorTransformer(Class<org.apache.wicket.Page> base,
Object params) |
WicketURLGeneratorTransformer(List processors) |
WicketURLGeneratorTransformer(Object base,
Object params) |
Modifier and Type | Method and Description |
---|---|
String |
getBaseUrlStr()
Base string for URL.
|
String |
getProtocolStrict()
If specified will ensure it uses this protocol (replaces default) for the generated URL.
|
String |
getUrlFormat()
|
Boolean |
getWwwStrict()
If specified true, will ensure it uses "www" convention is used for the link
|
void |
initWithRequestCycle(org.apache.wicket.RequestCycle requestCycle)
If
base is defines and we want to derive baseUrlStr then providing an opportunity for the Calling API
with the RequestCycle ThreadLocal to initialize this instance with the correct equivalent path. |
boolean |
isAbsolute() |
boolean |
isSecureURLUsingSalt()
Appends a parameter called salt.
|
protected String |
secureURL(Object input,
String url)
Override to secure url params
|
void |
setAbsolute(boolean absolute) |
void |
setBaseUrlStr(String baseUrlStr)
Base string for URL.
|
void |
setProtocolStrict(String protocolStrict)
If specified will ensure it uses this protocol (replaces default) for the generated URL.
|
void |
setSecureURLUsingSalt(boolean secureURLUsingSalt)
Appends a parameter called salt.
|
void |
setUrlFormat(String urlFormat)
|
void |
setWwwStrict(Boolean wwwStrict)
If specified true, will ensure it uses "www" convention is used for the link
|
Object |
transform(Object input)
|
addAnalyticsParams, decorateURL, 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 boolean secureURLUsingSalt
#secureURLUsingKey
is true then the value of this will also be encrypted.public WicketURLGeneratorTransformer()
public WicketURLGeneratorTransformer(List processors)
public WicketURLGeneratorTransformer(Class<org.apache.wicket.Page> base, Object params)
public WicketURLGeneratorTransformer(Class<org.apache.wicket.Page> base)
protected String secureURL(Object input, String url)
URLGeneratorTransformer
secureURL
in class URLGeneratorTransformer
public void initWithRequestCycle(org.apache.wicket.RequestCycle requestCycle)
base
is defines and we want to derive baseUrlStr
then providing an opportunity for the Calling API
with the RequestCycle
ThreadLocal
to initialize this instance with the correct equivalent path.initWithRequestCycle
in interface UsesRequestCycle
requestCycle
- as RequestCyclepublic 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 URLGeneratorTransformer
public boolean isAbsolute()
public void setAbsolute(boolean absolute)
public boolean isSecureURLUsingSalt()
#secureURLUsingKey
is true then the value of this will also be encrypted.public void setSecureURLUsingSalt(boolean secureURLUsingSalt)
#secureURLUsingKey
is true then the value of this will also be encrypted.public String getBaseUrlStr()
base
is uselesspublic void setBaseUrlStr(String baseUrlStr)
base
is uselesspublic String getUrlFormat()
public void setUrlFormat(String urlFormat)
public String getProtocolStrict()
absolute
is true.
public void setProtocolStrict(String protocolStrict)
absolute
is true.
public Boolean getWwwStrict()
public void setWwwStrict(Boolean wwwStrict)
Copyright © 2018. All rights reserved.