类的使用
org.apache.velocity.tools.generic.LinkTool
使用LinkTool的程序包
程序包
说明
Contains a collection of reusable, general-purpose "tools" for Velocity.
-
org.apache.velocity.tools.generic中LinkTool的使用
修饰符和类型方法说明LinkTool.absolute()Returns a copy of this LinkTool instance that hassetForceRelative(boolean)set to false and sets the scheme to the "http" if no scheme has been set yet.Returns a copy of the link with the specified URI reference either used as or converted to an absolute (non-relative) URI reference.Returns a copy of the link with the specified anchor to be added to the end of the generated hyperlink.Appends the given value to the end of the current path value.Appends a new key=value pair to the existing query data.LinkTool.directory()Returns a new LinkTool instance with the path set to the result ofgetDirectory()and the query and fragment set to null.protected LinkToolLinkTool.duplicate()Equivalent to clone, but with no checked exceptions.protected LinkToolLinkTool.duplicate(boolean deep) Equivalent to clone, but with no checked exceptions.LinkTool.getSelf()Returns a new instance with the specified value set as its host.LinkTool.insecure()Returns a new instance with the scheme set to "http".Adds a key=value pair to the query data.This method can do two different things.Returns a new instance with the specified value set as its path.Returns a new instance with the specified value set as its port number.Sets the specified value as the current query data, after normalizing the pair delimiters.LinkTool.relative()Returns a copy of this LinkTool instance that hassetForceRelative(boolean)set to true.Returns a copy of the link with the specified directory-relative URI reference set as the end of the path andsetForceRelative(boolean)set to true.Returns a new LinkTool instance that has any value(s) under the specified key removed from the query data.LinkTool.root()Returns a new LinkTool instance that represents the "root" of the current one, if it has one.Returns a new instance with the specified value set as its scheme.LinkTool.secure()Returns a new instance with the scheme set to "https".Sets a new key=value pair to the existing query data, overwriting any previous pair(s) that have the same key.Returns a copy of the link with the given URI reference set.Returns a new instance with the specified value set as its user info.