mpoeschl 2002/11/16 08:13:55
Modified: src/java/org/apache/turbine/util DynamicURI.java
xdocs changes.xml
Log:
TTWS5: Reference support for DynamicURI
Revision Changes Path
1.3 +35 -1
jakarta-turbine-2/src/java/org/apache/turbine/util/DynamicURI.java
Index: DynamicURI.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/DynamicURI.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DynamicURI.java 11 Jul 2002 16:53:21 -0000 1.2
+++ DynamicURI.java 16 Nov 2002 16:13:55 -0000 1.3
@@ -111,6 +111,8 @@
/** /foo/Turbine. */
protected String scriptName = null;
+ /** #ref */
+ protected String reference = null;
// Used with RunData constructors to provide a way around a JServ
// 1.0 bug.
@@ -585,6 +587,20 @@
}
/**
+ * Gets the reference (#ref).
+ *
+ * @return A String containing the reference.
+ */
+ public String getReference()
+ {
+ if (this.reference == null)
+ {
+ return "";
+ }
+ return this.reference;
+ }
+
+ /**
* Gets the server name.
*
* @return A String with the server name.
@@ -637,6 +653,7 @@
this.scriptName = this.getServerData().getScriptName();
this.pathInfo = new Vector();
this.queryData = new Vector();
+ this.reference = null;
}
/**
@@ -854,6 +871,18 @@
}
/**
+ * Sets the reference (#ref).
+ *
+ * @param reference A String containing the reference.
+ * @return A DynamicURI (self).
+ */
+ public DynamicURI setReference (String reference)
+ {
+ this.reference = reference;
+ return this;
+ }
+
+ /**
* Sets the server name.
*
* @param name A String with the server name.
@@ -960,6 +989,11 @@
{
output.append ( "?" );
output.append ( renderQueryString(this.queryData) );
+ }
+ if (this.reference != null)
+ {
+ output.append("#");
+ output.append(this.getReference());
}
// There seems to be a bug in Apache JServ 1.0 where the
1.10 +3 -0 jakarta-turbine-2/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/xdocs/changes.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- changes.xml 16 Nov 2002 15:41:04 -0000 1.9
+++ changes.xml 16 Nov 2002 16:13:55 -0000 1.10
@@ -75,6 +75,9 @@
<li>
TTWS1: TemplatePageAttributes enhancements
</li>
+ <li>
+ TTWS5: Reference support for DynamicURI
+ </li>
</ul>
</p>
</subsection>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>