cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/environment ForwardRedirector.java
Date Mon, 19 Jan 2004 10:50:57 GMT
sylvain     2004/01/19 02:50:57

  Modified:    src/java/org/apache/cocoon/environment
                        ForwardRedirector.java
  Log:
  Remove useless constant and turn into an abstract class
  
  Revision  Changes    Path
  1.12      +6 -9      cocoon-2.1/src/java/org/apache/cocoon/environment/ForwardRedirector.java
  
  Index: ForwardRedirector.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/ForwardRedirector.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ForwardRedirector.java	18 Jan 2004 22:27:26 -0000	1.11
  +++ ForwardRedirector.java	19 Jan 2004 10:50:57 -0000	1.12
  @@ -54,17 +54,18 @@
   
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.cocoon.ProcessingException;
  -import org.apache.cocoon.components.treeprocessor.TreeProcessor;
   import org.apache.cocoon.environment.wrapper.EnvironmentWrapper;
   
   /**
  - * A <code>Redirector</code> that handles forward redirects, i.e. internal
  + * A base class for <code>Redirector</code>s that handle forward redirects,
i.e. internal
    * redirects using the "cocoon:" pseudo-protocol.
  + * <p>
  + * Concrete subclasses have to define the <code>cocoonRedirect()</code> method.
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
    * @version CVS $Id$
    */
  -public class ForwardRedirector extends AbstractLogEnabled implements Redirector, PermanentRedirector
{
  +public abstract class ForwardRedirector extends AbstractLogEnabled implements Redirector,
PermanentRedirector {
   
       /**
        * Was there a call to <code>redirect()</code> ?
  @@ -133,10 +134,7 @@
           this.hasRedirected = true;
       }
   
  -    protected void cocoonRedirect(String uri)  throws IOException, ProcessingException
{
  -        // Simply notify the Processor.
  -        this.env.setAttribute(TreeProcessor.COCOON_REDIRECT_ATTR, uri);
  -    }
  +    protected abstract void cocoonRedirect(String uri)  throws IOException, ProcessingException;
   
       /**
        * Perform check on whether redirection has occured or not
  @@ -152,5 +150,4 @@
           env.setStatus(sc);
           this.hasRedirected = true;
       }
  -
   }
  
  
  

Mime
View raw message