📄 dynamicuri.html
字号:
<A NAME="addQueryData(java.lang.String, long)"><!-- --></A><H3>addQueryData</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>addQueryData</B>(java.lang.String name, long value)</PRE><DL><DD>Adds a name=value pair to the query string.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the name to add.<DD><CODE>value</CODE> - A long with the value to add.</DL></DD></DL><HR><A NAME="addQueryData(org.apache.turbine.util.ParameterParser)"><!-- --></A><H3>addQueryData</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>addQueryData</B>(<A HREF="../../../../org/apache/turbine/util/ParameterParser.html">ParameterParser</A> pp)</PRE><DL><DD>Adds a name=value pair for every entry in a ParameterParser object to the query string.<DD><DL><DT><B>Parameters:</B><DD><CODE>pp</CODE> - A ParameterParser.</DL></DD></DL><HR><A NAME="getA(java.lang.String)"><!-- --></A><H3>getA</H3><PRE>public java.lang.String <B>getA</B>(java.lang.String name)</PRE><DL><DD>Create an anchor object. This call to getA(): <code><pre> DynamicURI dui = new DynamicURI (data, "UserScreen" ); dui.setName("Click Here").addPathInfo("user","jon"); dui.getA(); </pre></code> would return the String: <p><A HREF="http://www.server.com:80/servlets/Turbine/screen=UserScreen&amp;user=jon">Click Here</A><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the name for the anchor.<DT><B>Returns:</B><DD>The anchor as a <A HREF="">name</A>.</DL></DD></DL><HR><A NAME="getScriptName()"><!-- --></A><H3>getScriptName</H3><PRE>public java.lang.String <B>getScriptName</B>()</PRE><DL><DD>Gets the script name (/servlets/Turbine).<DD><DL><DT><B>Returns:</B><DD>A String with the script name.</DL></DD></DL><HR><A NAME="getReference()"><!-- --></A><H3>getReference</H3><PRE>public java.lang.String <B>getReference</B>()</PRE><DL><DD>Gets the reference (#ref).<DD><DL><DT><B>Returns:</B><DD>A String containing the reference.</DL></DD></DL><HR><A NAME="getServerName()"><!-- --></A><H3>getServerName</H3><PRE>public java.lang.String <B>getServerName</B>()</PRE><DL><DD>Gets the server name.<DD><DL><DT><B>Returns:</B><DD>A String with the server name.</DL></DD></DL><HR><A NAME="getServerPort()"><!-- --></A><H3>getServerPort</H3><PRE>public int <B>getServerPort</B>()</PRE><DL><DD>Gets the server port.<DD><DL><DT><B>Returns:</B><DD>A String with the server port.</DL></DD></DL><HR><A NAME="getServerScheme()"><!-- --></A><H3>getServerScheme</H3><PRE>public java.lang.String <B>getServerScheme</B>()</PRE><DL><DD>Gets the server scheme (HTTP or HTTPS).<DD><DL><DT><B>Returns:</B><DD>A String with the server scheme.</DL></DD></DL><HR><A NAME="init()"><!-- --></A><H3>init</H3><PRE>protected void <B>init</B>()</PRE><DL><DD>Initializes some common variables.</DL><HR><A NAME="remove(int, java.lang.String)"><!-- --></A><H3>remove</H3><PRE>protected void <B>remove</B>(int type, java.lang.String name)</PRE><DL><DD><p>If the type is P (0), then remove name/value from the pathInfo hashtable. <p>If the type is Q (1), then remove name/value from the queryData hashtable.<DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - Type (P or Q) of removal.<DD><CODE>name</CODE> - A String with the name to be removed.</DL></DD></DL><HR><A NAME="removePathInfo()"><!-- --></A><H3>removePathInfo</H3><PRE>public void <B>removePathInfo</B>()</PRE><DL><DD>Removes all the path info elements.</DL><HR><A NAME="removePathInfo(java.lang.String)"><!-- --></A><H3>removePathInfo</H3><PRE>public void <B>removePathInfo</B>(java.lang.String name)</PRE><DL><DD>Removes a name=value pair from the path info.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the name to be removed.</DL></DD></DL><HR><A NAME="removeQueryData()"><!-- --></A><H3>removeQueryData</H3><PRE>public void <B>removeQueryData</B>()</PRE><DL><DD>Removes all the query string elements.</DL><HR><A NAME="removeQueryData(java.lang.String)"><!-- --></A><H3>removeQueryData</H3><PRE>public void <B>removeQueryData</B>(java.lang.String name)</PRE><DL><DD>Removes a name=value pair from the query string.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the name to be removed.</DL></DD></DL><HR><A NAME="renderPathInfo(java.util.Vector)"><!-- --></A><H3>renderPathInfo</H3><PRE>protected java.lang.String <B>renderPathInfo</B>(java.util.Vector data)</PRE><DL><DD>This method takes a Vector of key/value arrays and converts it into a URL encoded querystring format.<DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - A Vector of key/value arrays.<DT><B>Returns:</B><DD>A String with the URL encoded data.</DL></DD></DL><HR><A NAME="renderQueryString(java.util.Vector)"><!-- --></A><H3>renderQueryString</H3><PRE>protected java.lang.String <B>renderQueryString</B>(java.util.Vector data)</PRE><DL><DD>This method takes a Vector of key/value arrays and converts it into a URL encoded querystring format.<DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - A Vector of key/value arrays.<DT><B>Returns:</B><DD>A String with the URL encoded data.</DL></DD></DL><HR><A NAME="setAction(java.lang.String)"><!-- --></A><H3>setAction</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>setAction</B>(java.lang.String action)</PRE><DL><DD>Sets the action= value for this URL. <p>By default it adds the information to the path_info instead of the query data.<DD><DL><DT><B>Parameters:</B><DD><CODE>action</CODE> - A String with the action value.<DT><B>Returns:</B><DD>A DynamicURI (self).</DL></DD></DL><HR><A NAME="setScreen(java.lang.String)"><!-- --></A><H3>setScreen</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>setScreen</B>(java.lang.String screen)</PRE><DL><DD>Sets the screen= value for this URL. <p>By default it adds the information to the path_info instead of the query data.<DD><DL><DT><B>Parameters:</B><DD><CODE>action</CODE> - A String with the screen value.<DT><B>Returns:</B><DD>A DynamicURI (self).</DL></DD></DL><HR><A NAME="setScriptName(java.lang.String)"><!-- --></A><H3>setScriptName</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>setScriptName</B>(java.lang.String name)</PRE><DL><DD>Sets the script name (/servlets/Turbine).<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the script name.<DT><B>Returns:</B><DD>A DynamicURI (self).</DL></DD></DL><HR><A NAME="setReference(java.lang.String)"><!-- --></A><H3>setReference</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>setReference</B>(java.lang.String reference)</PRE><DL><DD>Sets the reference (#ref).<DD><DL><DT><B>Parameters:</B><DD><CODE>reference</CODE> - A String containing the reference.<DT><B>Returns:</B><DD>A DynamicURI (self).</DL></DD></DL><HR><A NAME="setServerName(java.lang.String)"><!-- --></A><H3>setServerName</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>setServerName</B>(java.lang.String name)</PRE><DL><DD>Sets the server name.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the server name.<DT><B>Returns:</B><DD>A DynamicURI (self).</DL></DD></DL><HR><A NAME="setServerPort(int)"><!-- --></A><H3>setServerPort</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>setServerPort</B>(int port)</PRE><DL><DD>Sets the server port.<DD><DL><DT><B>Parameters:</B><DD><CODE>port</CODE> - An int with the port.<DT><B>Returns:</B><DD>A DynamicURI (self).</DL></DD></DL><HR><A NAME="setSecure()"><!-- --></A><H3>setSecure</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>setSecure</B>()</PRE><DL><DD>Method to specify that a URI should use SSL. Whether or not it does is determined from TurbineResources.properties. Port number is 443.<DD><DL><DT><B>Returns:</B><DD>A DynamicURI (self).</DL></DD></DL><HR><A NAME="setSecure(int)"><!-- --></A><H3>setSecure</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>setSecure</B>(int port)</PRE><DL><DD>Method to specify that a URI should use SSL. Whether or not it does is determined from TurbineResources.properties.<DD><DL><DT><B>Parameters:</B><DD><CODE>port</CODE> - An int with the port number.<DT><B>Returns:</B><DD>A DynamicURI (self).</DL></DD></DL><HR><A NAME="setServerScheme(java.lang.String)"><!-- --></A><H3>setServerScheme</H3><PRE>public <A HREF="../../../../org/apache/turbine/util/DynamicURI.html">DynamicURI</A> <B>setServerScheme</B>(java.lang.String scheme)</PRE><DL><DD>Sets the scheme (HTTP or HTTPS).<DD><DL><DT><B>Parameters:</B><DD><CODE>scheme</CODE> - A String with the scheme.<DT><B>Returns:</B><DD>A DynamicURI (self).</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Builds the URL with all of the data URL-encoded as well as encoded using HttpServletResponse.encodeUrl(). <p> <code><pre> DynamicURI dui = new DynamicURI (data, "UserScreen" ); dui.addPathInfo("us
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -