You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/12/06 09:02:10 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper EnvironmentWrapper.java RequestWrapper.java
cziegeler 2002/12/06 00:02:10
Modified: src/java/org/apache/cocoon/environment/wrapper Tag:
cocoon_2_0_3_branch EnvironmentWrapper.java
RequestWrapper.java
Log:
Readding accidentally removed methods
Revision Changes Path
No revision
No revision
1.11.2.4 +30 -1 xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java
Index: EnvironmentWrapper.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java,v
retrieving revision 1.11.2.3
retrieving revision 1.11.2.4
diff -u -r1.11.2.3 -r1.11.2.4
--- EnvironmentWrapper.java 5 Dec 2002 14:07:56 -0000 1.11.2.3
+++ EnvironmentWrapper.java 6 Dec 2002 08:02:09 -0000 1.11.2.4
@@ -292,4 +292,33 @@
this.uris = this.lastURI;
return this.processor;
}
+
+ /**
+ * Lookup an attribute in this instance, and if not found search it
+ * in the wrapped environment.
+ *
+ * @param name a <code>String</code>, the name of the attribute to
+ * look for
+ * @return an <code>Object</code>, the value of the attribute or
+ * null if no such attribute was found.
+ */
+ public Object getAttribute(String name)
+ {
+ Object value = super.getAttribute(name);
+ if (value == null)
+ value = environment.getAttribute(name);
+
+ return value;
+ }
+
+ /**
+ * Remove attribute from the current instance, as well as from the
+ * wrapped environment.
+ *
+ * @param name a <code>String</code> value
+ */
+ public void removeAttribute(String name) {
+ super.removeAttribute(name);
+ environment.removeAttribute(name);
+ }
}
1.7.2.1 +6 -6 xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java
Index: RequestWrapper.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- RequestWrapper.java 22 Feb 2002 07:03:51 -0000 1.7
+++ RequestWrapper.java 6 Dec 2002 08:02:09 -0000 1.7.2.1
@@ -69,20 +69,20 @@
*/
public final class RequestWrapper implements Request {
- /** The real Request object */
- private Request req;
+ /** The real {@link Request} object */
+ private final Request req;
/** The query string */
private String queryString;
/** The request parameters */
- private RequestParameters parameters ;
+ private final RequestParameters parameters ;
/** The environment */
- private Environment environment;
+ private final Environment environment;
/** raw mode? **/
- private boolean rawMode;
+ private final boolean rawMode;
/**
* Constructor
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org