public class LinkFactoryImpl extends java.lang.Object implements LinkFactory
Constructor and Description |
---|
LinkFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
ILink |
constructLink(IEngineService service,
boolean post,
java.util.Map parameters,
boolean stateful)
Constructs an
ILink . |
java.lang.Object[] |
extractListenerParameters(IRequestCycle cycle)
A secondary function of the service is to convert encoded (aka "squeezed") listener
parameters back into an array of Objects.
|
protected void |
finalizeParameters(IEngineService service,
java.util.Map parameters) |
ServiceEncoder[] |
getServiceEncoders()
Returns an array of
ServiceEncoder , ordering into
execution order. |
void |
initializeService() |
void |
setContextPath(java.lang.String contextPath) |
void |
setContributions(java.util.List contributions) |
void |
setDataSqueezer(DataSqueezer dataSqueezer) |
void |
setErrorLog(org.apache.hivemind.ErrorLog errorLog) |
void |
setPersistenceStrategySource(PropertyPersistenceStrategySource persistenceStrategySource)
This is kind of limiting; it's possible that other things beyond persistence strategies will
want to have a hand at encoding data into URLs.
|
void |
setRequest(WebRequest request) |
void |
setRequestCycle(IRequestCycle requestCycle) |
void |
setServletPath(java.lang.String servletPath) |
protected void |
squeezeServiceParameters(java.util.Map parameters) |
public LinkFactoryImpl()
public void initializeService()
public ILink constructLink(IEngineService service, boolean post, java.util.Map parameters, boolean stateful)
LinkFactory
ILink
.constructLink
in interface LinkFactory
service
- the service for which the link is being generatedpost
- if true, then the link will be used for a post (not a get, i.e., for a HTML form);
this may affect what information is encoded into the linkparameters
- A map; keys are strings and values are strings or string arrays (exception: key
ServiceConstants.PARAMETER
is an array of objects. Certain keys, defined
in ServiceConstants
may have special meaning. The map will typically be
modified internally. May not be null.stateful
- If true, then the final URL should be encoded (with the session id) if necessary.
If false, the session encoding should not occur. The latter case is useful for
services that will absolutely not need any access to user-specific state.protected void finalizeParameters(IEngineService service, java.util.Map parameters)
public ServiceEncoder[] getServiceEncoders()
LinkFactory
ServiceEncoder
, ordering into
execution order. May return an empty array, but won't return null.getServiceEncoders
in interface LinkFactory
protected void squeezeServiceParameters(java.util.Map parameters)
public java.lang.Object[] extractListenerParameters(IRequestCycle cycle)
LinkFactory
extractListenerParameters
in interface LinkFactory
cycle
- the current request cyclepublic void setDataSqueezer(DataSqueezer dataSqueezer)
public void setContributions(java.util.List contributions)
public void setErrorLog(org.apache.hivemind.ErrorLog errorLog)
public void setServletPath(java.lang.String servletPath)
public void setContextPath(java.lang.String contextPath)
public void setRequest(WebRequest request)
public void setPersistenceStrategySource(PropertyPersistenceStrategySource persistenceStrategySource)
public void setRequestCycle(IRequestCycle requestCycle)