cziegeler    2002/12/06 00:01:12

  Modified:    src/java/org/apache/cocoon/environment/wrapper
                        EnvironmentWrapper.java
  Log:
  Readding accidentally removed methods
  
  Revision  Changes    Path
  1.25      +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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- EnvironmentWrapper.java   5 Dec 2002 14:21:36 -0000       1.24
  +++ EnvironmentWrapper.java   6 Dec 2002 08:01:12 -0000       1.25
  @@ -368,4 +368,33 @@
           this.environment.toSAX( source, handler );
       }
   
  +    /**
  +     * 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);
  +    }
  +
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to