Class LinkTool
- java.lang.Object
-
- org.apache.velocity.tools.generic.SafeConfig
-
- org.apache.velocity.tools.generic.LinkTool
-
- org.apache.velocity.tools.view.LinkTool
-
- org.apache.velocity.tools.view.tools.LinkTool
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
StrutsLinkTool
@Deprecated public class LinkTool extends LinkTool
Deprecated.UseLinkTool
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.servlet.ServletContextapplicationDeprecated.static StringAUTO_IGNORE_PARAMETERS_KEYDeprecated.static StringSELF_ABSOLUTE_KEYDeprecated.static StringSELF_INCLUDE_PARAMETERS_KEYDeprecated.-
Fields inherited from class org.apache.velocity.tools.view.LinkTool
INCLUDE_REQUEST_PARAMS_KEY, includeRequestParams, request, response
-
Fields inherited from class org.apache.velocity.tools.generic.LinkTool
APPEND_PARAMS_KEY, appendParams, charset, CHARSET_KEY, DEFAULT_CHARSET, DEFAULT_SCHEME, FORCE_RELATIVE_KEY, forceRelative, fragment, FRAGMENT_KEY, host, HOST_KEY, HTML_QUERY_DELIMITER, LOG, opaque, path, PATH_KEY, port, PORT_KEY, query, QUERY_KEY, queryDelim, scheme, SCHEME_KEY, SECURE_SCHEME, self, URI_KEY, user, USER_KEY, XHTML_MODE_KEY, XHTML_QUERY_DELIMITER
-
Fields inherited from class org.apache.velocity.tools.generic.SafeConfig
LOCK_CONFIG_KEY, OLD_LOCK_CONFIG_KEY, SAFE_MODE_KEY
-
-
Constructor Summary
Constructors Constructor Description LinkTool()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LinkTooladdAllParameters()Deprecated.use#addRequestParams(String...)or#addRequestParamsExcept(String...)or#addMissingRequestParams(String...)LinkTooladdIgnore(String parameterName)Deprecated.use#addRequestParams(String...)or#addRequestParamsExcept(String...)or#addMissingRequestParams(String...)LinkTooladdQueryData(String key, Object value)Deprecated.LinkTooladdQueryData(Map parameters)Deprecated.protected voidconfigure(ValueParser parser)Deprecated.Does the actual configuration.protected LinkToolduplicate(boolean deep)Deprecated.Equivalent to clone, but with no checked exceptions.StringencodeURL(String url)Deprecated.StringgetQueryData()Deprecated.StringgetURI()Deprecated.voidinit(Object obj)Deprecated.LinkToolsetAbsolute(String uri)Deprecated.LinkToolsetAnchor(String anchor)Deprecated.useLinkTool.anchor(Object)insteadvoidsetAutoIgnoreParameters(boolean autoIgnore)Deprecated.voidsetParam(Object key, Object value, boolean append)Deprecated.If there is no existing value for this key in the query, it will simply add it and its value to the query.voidsetParams(Object obj, boolean append)Deprecated.If append is false, this simply delegates toLinkTool.setQuery(java.lang.Object).LinkToolsetRelative(String uri)Deprecated.voidsetRequest(javax.servlet.http.HttpServletRequest request)Deprecated.voidsetResponse(javax.servlet.http.HttpServletResponse response)Deprecated.voidsetSelfAbsolute(boolean selfAbsolute)Deprecated.useLinkTool.setForceRelative(boolean)as reversed replacementvoidsetSelfIncludeParameters(boolean selfParams)Deprecated.useLinkTool.setIncludeRequestParams(boolean)insteadLinkToolsetURI(String uri)Deprecated.voidsetXhtml(boolean useXhtml)Deprecated.-
Methods inherited from class org.apache.velocity.tools.view.LinkTool
addMissingRequestParams, addRequestParams, addRequestParamsExcept, getContextPath, getContextURL, getRequestPath, isPathChanged, setFromRequest, setIncludeRequestParams, toString
-
Methods inherited from class org.apache.velocity.tools.generic.LinkTool
absolute, absolute, anchor, append, append, appendAsArray, appendPath, appendQuery, combinePath, combineQuery, createURI, debug, debug, decode, decodeQueryPercents, directory, duplicate, encode, equals, getAnchor, getAppendParams, getBaseRef, getCharacterEncoding, getDirectory, getFile, getHost, getParams, getPath, getPort, getQuery, getRoot, getScheme, getSelf, getUri, getUser, handleParamsBoolean, hashCode, host, insecure, isAbsolute, isOpaque, isRelative, isSecure, isXHTML, normalizeQuery, param, params, parseQuery, parseQuery, path, port, query, relative, relative, remove, removeParam, root, scheme, secure, set, setAppendParams, setCharacterEncoding, setForceRelative, setFragment, setFromURI, setHost, setPath, setPort, setQuery, setScheme, setUserInfo, setXHTML, toQuery, toQuery, toURI, uri, user
-
Methods inherited from class org.apache.velocity.tools.generic.SafeConfig
configure, isConfigLocked, isSafeMode, setLockConfig, setSafeMode
-
-
-
-
Field Detail
-
SELF_ABSOLUTE_KEY
@Deprecated public static final String SELF_ABSOLUTE_KEY
Deprecated.- See Also:
- Constant Field Values
-
SELF_INCLUDE_PARAMETERS_KEY
@Deprecated public static final String SELF_INCLUDE_PARAMETERS_KEY
Deprecated.- See Also:
- Constant Field Values
-
AUTO_IGNORE_PARAMETERS_KEY
@Deprecated public static final String AUTO_IGNORE_PARAMETERS_KEY
Deprecated.- See Also:
- Constant Field Values
-
application
@Deprecated protected javax.servlet.ServletContext application
Deprecated.
-
-
Method Detail
-
configure
protected void configure(ValueParser parser)
Deprecated.Description copied from class:SafeConfigDoes the actual configuration. This is protected, so subclasses may share the same ValueParser and call configure at any time, while preventing templates from doing so when configure(Map) is locked.
-
init
@Deprecated public void init(Object obj)
Deprecated.
-
setXhtml
@Deprecated public void setXhtml(boolean useXhtml)
Deprecated.
-
setSelfAbsolute
@Deprecated public void setSelfAbsolute(boolean selfAbsolute)
Deprecated.useLinkTool.setForceRelative(boolean)as reversed replacement
-
setSelfIncludeParameters
@Deprecated public void setSelfIncludeParameters(boolean selfParams)
Deprecated.useLinkTool.setIncludeRequestParams(boolean)instead
-
setAutoIgnoreParameters
@Deprecated public void setAutoIgnoreParameters(boolean autoIgnore)
Deprecated.
-
setRequest
@Deprecated public void setRequest(javax.servlet.http.HttpServletRequest request)
Deprecated.
-
setResponse
@Deprecated public void setResponse(javax.servlet.http.HttpServletResponse response)
Deprecated.
-
setAnchor
@Deprecated public LinkTool setAnchor(String anchor)
Deprecated.useLinkTool.anchor(Object)instead
-
setRelative
@Deprecated public LinkTool setRelative(String uri)
Deprecated.
-
setAbsolute
@Deprecated public LinkTool setAbsolute(String uri)
Deprecated.
-
setURI
@Deprecated public LinkTool setURI(String uri)
Deprecated.
-
getURI
@Deprecated public String getURI()
Deprecated.
-
addQueryData
@Deprecated public LinkTool addQueryData(String key, Object value)
Deprecated.
-
addQueryData
@Deprecated public LinkTool addQueryData(Map parameters)
Deprecated.
-
getQueryData
@Deprecated public String getQueryData()
Deprecated.
-
encodeURL
@Deprecated public String encodeURL(String url)
Deprecated.
-
addIgnore
@Deprecated public LinkTool addIgnore(String parameterName)
Deprecated.use#addRequestParams(String...)or#addRequestParamsExcept(String...)or#addMissingRequestParams(String...)If you do use this, then you must useaddAllParameters()and not the replacements for it, or these will not be honored.
-
addAllParameters
@Deprecated public LinkTool addAllParameters()
Deprecated.use#addRequestParams(String...)or#addRequestParamsExcept(String...)or#addMissingRequestParams(String...)
-
setParam
public void setParam(Object key, Object value, boolean append)
Deprecated.Description copied from class:LinkToolIf there is no existing value for this key in the query, it will simply add it and its value to the query. If the key already is present in the query and append is true, this will add the specified value to those already under that key. IfLinkTool.appendParamsis false, this will override the existing values with the specified new value.
-
setParams
public void setParams(Object obj, boolean append)
Deprecated.Description copied from class:LinkToolIf append is false, this simply delegates toLinkTool.setQuery(java.lang.Object). Otherwise, if the specified object is null, it does nothing. If the object is not a Map, it will turn it into a String and useLinkTool.parseQuery(java.lang.String)to parse it. Once it is a Map, it will iterate through the entries appending each key/value to the current query data.
-
duplicate
protected LinkTool duplicate(boolean deep)
Deprecated.Description copied from class:LinkToolEquivalent to clone, but with no checked exceptions. If for some unfathomable reason clone() doesn't work, this will throw a RuntimeException. If doing a deep clone, then the parameter Map will also be cloned.
-
-