You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2004/10/30 19:15:42 UTC

cvs commit: jakarta-tapestry/framework/src/test/org/apache/tapestry/engine TestRestartService.java

hlship      2004/10/30 10:15:42

  Modified:    framework/src/java/org/apache/tapestry/spec
                        ParameterSpecification.java
               framework/src/java/org/apache/tapestry/enhance
                        EnhancementOperation.java
               .        forrest.properties build.xml project.properties
               framework build.xml
               src/documentation/conf cli.xconf
               src/documentation/content/xdocs site.xml
               src/documentation skinconf.xml
  Added:       framework/src/java/org/apache/tapestry/enhance
                        ParameterPropertyWorker.java
               framework/src/test/org/apache/tapestry/enhance
                        TestParameterPropertyWorker.java
               framework/src/test/org/apache/tapestry/engine
                        TestRestartService.java
  Removed:     framework/src/test/org/apache/tapestry/enhance
                        TestRestartService.java
  Log:
  Add ParameterPropertyWorker, the next piece of the new component enhancer subsystem.
  
  Revision  Changes    Path
  1.3       +66 -77    jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/ParameterSpecification.java
  
  Index: ParameterSpecification.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/ParameterSpecification.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParameterSpecification.java	16 Sep 2004 00:26:28 -0000	1.2
  +++ ParameterSpecification.java	30 Oct 2004 17:15:42 -0000	1.3
  @@ -15,143 +15,132 @@
   package org.apache.tapestry.spec;
   
   import org.apache.hivemind.impl.BaseLocatable;
  +import org.apache.tapestry.Defense;
   
   /**
  - *  Defines a formal parameter to a component.  A <code>IParameterSpecification</code>
  - *  is contained by a {@link IComponentSpecification}.
  - *
  - *  <p>TBD: Identify arrays in some way.
  - *
  - *  @author Howard Lewis Ship
  + * Defines a formal parameter to a component. A <code>IParameterSpecification</code> is contained
  + * by a {@link IComponentSpecification}.
  + * <p>
  + * TBD: Identify arrays in some way.
    * 
  - **/
  + * @author Howard Lewis Ship
  + */
   
   public class ParameterSpecification extends BaseLocatable implements IParameterSpecification
   {
  -    private boolean required = false;
  -    private String type;
  +    private boolean _required = false;
   
  -    /** @since 1.0.9 **/
  -    private String description;
  -    
  -    /** @since 2.0.3 **/
  -    private String propertyName;
  -    
  -    /** @since 3.0 **/
  -    private String defaultValue = null;
  -
  -	private Direction direction = Direction.CUSTOM;
  -	
  -    /**
  -     *  Returns the class name of the expected type of the parameter.  The default value
  -     *  is <code>java.lang.Object</code> which matches anything.
  -     *
  -     **/
  +    private String _type;
  +
  +    /** @since 1.0.9 * */
  +    private String _description;
  +
  +    /** @since 2.0.3 * */
  +    private String _propertyName;
  +
  +    /** @since 3.0 * */
  +    private String _defaultValue = null;
  +
  +    private Direction _direction = Direction.CUSTOM;
  +
  +    /**
  +     * Returns the class name of the expected type of the parameter. The default value is
  +     * <code>java.lang.Object</code> which matches anything.
  +     */
   
       public String getType()
       {
  -        return type;
  +        return _type;
       }
   
       /**
  -     *  Returns true if the parameter is required by the component.
  -     *  The default is false, meaning the parameter is optional.
  -     *
  -     **/
  +     * Returns true if the parameter is required by the component. The default is false, meaning the
  +     * parameter is optional.
  +     */
   
       public boolean isRequired()
       {
  -        return required;
  +        return _required;
       }
   
       public void setRequired(boolean value)
       {
  -        required = value;
  +        _required = value;
       }
   
  -	/**
  -	 *  Sets the type of value expected for the parameter.  This can be
  -	 *  left blank to indicate any type.
  -	 * 
  -	 **/
  -	
  +    /**
  +     * Sets the type of value expected for the parameter. This can be left blank to indicate any
  +     * type.
  +     */
  +
       public void setType(String value)
       {
  -        type = value;
  +        _type = value;
       }
   
       /**
  -     *  Returns the documentation for this parameter.
  +     * Returns the documentation for this parameter.
        * 
  -     *  @since 1.0.9
  -     * 
  -     **/
  +     * @since 1.0.9
  +     */
   
       public String getDescription()
       {
  -        return description;
  +        return _description;
       }
   
       /**
  -     *  Sets the documentation for this parameter.
  +     * Sets the documentation for this parameter.
        * 
  -     *  @since 1.0.9
  -     *    	 
  -     **/
  +     * @since 1.0.9
  +     */
   
       public void setDescription(String description)
       {
  -        this.description = description;
  +        _description = description;
       }
  -    
  +
       /**
  -     *  Sets the property name (of the component class)
  -     *  to connect the parameter to.
  -     * 
  -     **/
  -    
  +     * Sets the property name (of the component class) to connect the parameter to.
  +     */
  +
       public void setPropertyName(String propertyName)
       {
  -        this.propertyName = propertyName;
  +        _propertyName = propertyName;
       }
  -    
  +
       /**
  -     *  Returns the name of the JavaBeans property to connect the
  -     *  parameter to.
  -     * 
  -     **/
  -    
  +     * Returns the name of the JavaBeans property to connect the parameter to.
  +     */
  +
       public String getPropertyName()
       {
  -       return propertyName;
  +        return _propertyName;
       }
   
  -	/**
  -	 *  Returns the parameter value direction, defaulting to {@link Direction#CUSTOM}
  -	 *  if not otherwise specified.
  -	 * 
  -	 **/
  -	
  +    /**
  +     * Returns the parameter value direction, defaulting to {@link Direction#CUSTOM}if not
  +     * otherwise specified.
  +     */
  +
       public Direction getDirection()
       {
  -        return direction;
  +        return _direction;
       }
   
       public void setDirection(Direction direction)
       {
  -        if (direction == null)
  -        	throw new IllegalArgumentException("direction may not be null.");
  -        	
  -        this.direction = direction;
  -    }
  +        Defense.notNull(direction, "direction");
   
  +        _direction = direction;
  +    }
   
       /**
        * @see org.apache.tapestry.spec.IParameterSpecification#getDefaultValue()
        */
       public String getDefaultValue()
       {
  -        return defaultValue;
  +        return _defaultValue;
       }
   
       /**
  @@ -159,7 +148,7 @@
        */
       public void setDefaultValue(String defaultValue)
       {
  -        this.defaultValue = defaultValue;
  +        _defaultValue = defaultValue;
       }
   
   }
  
  
  
  1.2       +8 -0      jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/EnhancementOperation.java
  
  Index: EnhancementOperation.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/EnhancementOperation.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EnhancementOperation.java	29 Oct 2004 17:13:52 -0000	1.1
  +++ EnhancementOperation.java	30 Oct 2004 17:15:42 -0000	1.2
  @@ -87,4 +87,12 @@
        * subclass of the component class will usually be created.
        */
       public Class getBaseClass();
  +    
  +    /**
  +     * Returns a reference to a particular class.  This will, effectively, by the name
  +     * of a private field.
  +     * 
  +     */
  +    
  +    public String getClassReference(Class clazz);
   }
  
  
  
  1.1                  jakarta-tapestry/framework/src/java/org/apache/tapestry/enhance/ParameterPropertyWorker.java
  
  Index: ParameterPropertyWorker.java
  ===================================================================
  // Copyright 2004 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.enhance;
  
  import java.lang.reflect.Modifier;
  import java.util.Iterator;
  
  import org.apache.commons.logging.Log;
  import org.apache.hivemind.ErrorHandler;
  import org.apache.hivemind.service.BodyBuilder;
  import org.apache.hivemind.service.MethodSignature;
  import org.apache.tapestry.Defense;
  import org.apache.tapestry.spec.Direction;
  import org.apache.tapestry.spec.IComponentSpecification;
  import org.apache.tapestry.spec.IParameterSpecification;
  
  /**
   * Responsible for creating properties for connected parameters.
   * 
   * @author Howard M. Lewis Ship
   * @since 3.1
   */
  public class ParameterPropertyWorker implements EnhancementWorker
  {
      private Log _log;
  
      private ErrorHandler _errorHandler;
  
      public void performEnhancement(EnhancementOperation op)
      {
          Defense.notNull(op, "op");
  
          IComponentSpecification spec = op.getSpecification();
  
          Iterator i = spec.getParameterNames().iterator();
          while (i.hasNext())
          {
              String name = (String) i.next();
  
              IParameterSpecification ps = spec.getParameter(name);
  
              try
              {
                  performEnhancement(op, name, ps);
              }
              catch (RuntimeException ex)
              {
                  _errorHandler.error(_log, EnhanceMessages.errorAddingProperty(
                          ps.getPropertyName(),
                          op.getBaseClass(),
                          ex), ps.getLocation(), ex);
              }
          }
      }
  
      /**
       * Performs the enhancement for a single parameter; this is about to change radically in release
       * 3.1 but for the moment we're emulating 3.0 behavior.
       */
  
      private void performEnhancement(EnhancementOperation op, String parameterName,
              IParameterSpecification ps)
      {
          if (ps.getDirection() == Direction.CUSTOM)
              return;
  
          String propertyName = ps.getPropertyName();
  
          Class propertyType = op.convertTypeName(ps.getType());
  
          op.validateProperty(propertyName, propertyType);
  
          // 3.0 would allow connected parameter properties to be fully implemented
          // in the component class. This is not supported in 3.1 and an existing
          // property will be overwritten in the subclass.
  
          op.claimProperty(propertyName);
  
          // 3.0 used to support a property for the binding itself. That's
          // no longer the case.
  
          if (ps.getDirection() == Direction.AUTO)
          {
              createAutoParameterProperty(op, parameterName, propertyName, propertyType);
              return;
          }
  
          createSimpleParameterProperty(op, propertyName, propertyType);
      }
  
      private void createSimpleParameterProperty(EnhancementOperation op, String propertyName,
              Class propertyType)
      {
          String fieldName = "_$" + propertyName;
  
          op.addField(fieldName, propertyType);
  
          createSimpleAccessor(op, fieldName, propertyName, propertyType);
          createSimpleMutator(op, fieldName, propertyName, propertyType);
      }
  
      private void createSimpleAccessor(EnhancementOperation op, String fieldName,
              String propertyName, Class propertyType)
      {
          String methodName = op.getAccessorMethodName(propertyName);
  
          op.addMethod(
                  Modifier.PUBLIC,
                  new MethodSignature(propertyType, methodName, null, null),
                  "return " + fieldName + ";");
      }
  
      private void createSimpleMutator(EnhancementOperation op, String fieldName,
              String propertyName, Class propertyType)
      {
          String methodName = EnhanceUtils.createMutatorMethodName(propertyName);
  
          op.addMethod(Modifier.PUBLIC, new MethodSignature(void.class, methodName, new Class[]
          { propertyType }, null), fieldName + " = $1;");
      }
  
      private void createAutoParameterProperty(EnhancementOperation op, String parameterName,
              String propertyName, Class propertyType)
      {
          createAutoAccessor(op, parameterName, propertyName, propertyType);
          createAutoMutator(op, parameterName, propertyName, propertyType);
      }
  
      private void createAutoAccessor(EnhancementOperation op, String parameterName,
              String propertyName, Class propertyType)
      {
          String methodName = op.getAccessorMethodName(propertyName);
          String classReference = op.getClassReference(propertyType);
  
          BodyBuilder b = new BodyBuilder();
  
          b.begin();
          b.addln("org.apache.tapestry.IBinding binding = getBinding(\"{0}\");", parameterName);
          b.addln("return ($r)binding.getObject(\"{0}\", {1});", parameterName, classReference);
          b.end();
  
          op.addMethod(Modifier.PUBLIC, new MethodSignature(propertyType, methodName, null, null), b
                  .toString());
      }
  
      private void createAutoMutator(EnhancementOperation op, String parameterName,
              String propertyName, Class propertyType)
      {
          String methodName = EnhanceUtils.createMutatorMethodName(propertyName);
  
          BodyBuilder b = new BodyBuilder();
  
          b.begin();
          b.addln("org.apache.tapestry.IBinding binding = getBinding(\"{0}\");", parameterName);
          b.addln("binding.setObject(($w) $1);");
          b.end();
  
          op.addMethod(Modifier.PUBLIC, new MethodSignature(void.class, methodName, new Class[]
          { propertyType }, null), b.toString());
      }
  
      public void setErrorHandler(ErrorHandler errorHandler)
      {
          _errorHandler = errorHandler;
      }
  
      public void setLog(Log log)
      {
          _log = log;
      }
  
  }
  
  
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/enhance/TestParameterPropertyWorker.java
  
  Index: TestParameterPropertyWorker.java
  ===================================================================
  // Copyright 2004 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.enhance;
  
  import java.lang.reflect.Modifier;
  import java.util.Collections;
  import java.util.List;
  
  import org.apache.commons.logging.Log;
  import org.apache.hivemind.ApplicationRuntimeException;
  import org.apache.hivemind.ErrorHandler;
  import org.apache.hivemind.Location;
  import org.apache.hivemind.service.BodyBuilder;
  import org.apache.hivemind.service.MethodSignature;
  import org.apache.hivemind.test.HiveMindTestCase;
  import org.apache.tapestry.BaseComponent;
  import org.apache.tapestry.spec.Direction;
  import org.apache.tapestry.spec.IComponentSpecification;
  import org.apache.tapestry.spec.IParameterSpecification;
  import org.apache.tapestry.spec.ParameterSpecification;
  import org.easymock.MockControl;
  
  /**
   * Tests for {@link org.apache.tapestry.enhance.ParameterPropertyWorker}.
   * 
   * @author Howard M. Lewis Ship
   */
  public class TestParameterPropertyWorker extends HiveMindTestCase
  {
      private ParameterSpecification buildParameterSpec(String propertyName, String type,
              Direction direction)
      {
          return buildParameterSpec(propertyName, type, direction, null);
      }
  
      private ParameterSpecification buildParameterSpec(String propertyName, String type,
              Direction direction, Location location)
      {
          ParameterSpecification ps = new ParameterSpecification();
  
          ps.setPropertyName(propertyName);
          ps.setType(type);
          ps.setDirection(direction);
          ps.setLocation(location);
  
          return ps;
      }
  
      private IComponentSpecification buildComponentSpecification(String parameterName,
              IParameterSpecification ps)
      {
          MockControl c = newControl(IComponentSpecification.class);
          IComponentSpecification result = (IComponentSpecification) c.getMock();
  
          result.getParameterNames();
  
          c.setReturnValue(Collections.singletonList(parameterName));
  
          result.getParameter(parameterName);
          c.setReturnValue(ps);
  
          return result;
      }
  
      /**
       * Test 3.0 custom parameter behavior, which is to do nothing.
       */
  
      public void testCustomParameter()
      {
          IComponentSpecification spec = buildComponentSpecification("fred", buildParameterSpec(
                  "fred",
                  "boolean",
                  Direction.CUSTOM));
  
          MockControl opc = newControl(EnhancementOperation.class);
          EnhancementOperation op = (EnhancementOperation) opc.getMock();
  
          op.getSpecification();
          opc.setReturnValue(spec);
  
          replayControls();
  
          ParameterPropertyWorker w = new ParameterPropertyWorker();
  
          w.performEnhancement(op);
  
          verifyControls();
      }
  
      /**
       * Test for a Tapestry 3.0 in or form parameter.
       */
  
      public void testNormalParameter()
      {
          // fred is the parameter name, barney is the property name
  
          IComponentSpecification spec = buildComponentSpecification("fred", buildParameterSpec(
                  "barney",
                  "boolean",
                  Direction.IN));
  
          MockControl opc = newControl(EnhancementOperation.class);
          EnhancementOperation op = (EnhancementOperation) opc.getMock();
  
          op.getSpecification();
          opc.setReturnValue(spec);
  
          op.convertTypeName("boolean");
          opc.setReturnValue(boolean.class);
  
          op.validateProperty("barney", boolean.class);
  
          op.claimProperty("barney");
  
          op.addField("_$barney", boolean.class);
  
          op.getAccessorMethodName("barney");
          opc.setReturnValue("isBarney");
  
          op.addMethod(
                  Modifier.PUBLIC,
                  new MethodSignature(boolean.class, "isBarney", null, null),
                  "return _$barney;");
  
          op.addMethod(Modifier.PUBLIC, new MethodSignature(void.class, "setBarney", new Class[]
          { boolean.class }, null), "_$barney = $1;");
  
          replayControls();
  
          ParameterPropertyWorker w = new ParameterPropertyWorker();
  
          w.performEnhancement(op);
  
          verifyControls();
      }
  
      public void testAutoParameter()
      {
          // fred is the parameter name, barney is the property name
  
          IComponentSpecification spec = buildComponentSpecification("fred", buildParameterSpec(
                  "barney",
                  "long",
                  Direction.AUTO));
  
          MockControl opc = newControl(EnhancementOperation.class);
          EnhancementOperation op = (EnhancementOperation) opc.getMock();
  
          op.getSpecification();
          opc.setReturnValue(spec);
  
          op.convertTypeName("long");
          opc.setReturnValue(long.class);
  
          op.validateProperty("barney", long.class);
  
          op.claimProperty("barney");
  
          op.getAccessorMethodName("barney");
          opc.setReturnValue("getBarney");
  
          op.getClassReference(long.class);
          opc.setReturnValue("_$class_long");
  
          BodyBuilder b = new BodyBuilder();
          b.begin();
          b.addln("org.apache.tapestry.IBinding binding = getBinding(\"fred\");");
          b.addln("return ($r)binding.getObject(\"fred\", _$class_long);");
          b.end();
  
          op.addMethod(Modifier.PUBLIC, new MethodSignature(long.class, "getBarney", null, null), b
                  .toString());
  
          b = new BodyBuilder();
          b.begin();
          b.addln("org.apache.tapestry.IBinding binding = getBinding(\"fred\");");
          b.addln("binding.setObject(($w) $1);");
          b.end();
  
          op.addMethod(Modifier.PUBLIC, new MethodSignature(void.class, "setBarney", new Class[]
          { long.class }, null), b.toString());
  
          replayControls();
  
          ParameterPropertyWorker w = new ParameterPropertyWorker();
  
          w.performEnhancement(op);
  
          verifyControls();
      }
  
      public void testFailure() throws Exception
      {
          Location l = fabricateLocation(207);
  
          IComponentSpecification spec = buildComponentSpecification("fred", buildParameterSpec(
                  "wilma",
                  "String",
                  Direction.IN,
                  l));
  
          MockControl opc = newControl(EnhancementOperation.class);
          EnhancementOperation op = (EnhancementOperation) opc.getMock();
  
          op.getSpecification();
          opc.setReturnValue(spec);
  
          op.convertTypeName("String");
          Throwable ex = new ApplicationRuntimeException("Simulated error.");
          opc.setThrowable(ex);
  
          op.getBaseClass();
          opc.setReturnValue(BaseComponent.class);
  
          Log log = (Log) newMock(Log.class);
          ErrorHandler errorHandler = (ErrorHandler) newMock(ErrorHandler.class);
  
          errorHandler
                  .error(
                          log,
                          "Error adding property 'wilma' to class org.apache.tapestry.BaseComponent: Simulated error.",
                          l,
                          ex);
  
          replayControls();
  
          ParameterPropertyWorker w = new ParameterPropertyWorker();
          w.setLog(log);
          w.setErrorHandler(errorHandler);
  
          w.performEnhancement(op);
  
          verifyControls();
      }
  
  }
  
  
  1.4       +2 -5      jakarta-tapestry/forrest.properties
  
  Index: forrest.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/forrest.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- forrest.properties	3 Sep 2004 17:52:51 -0000	1.3
  +++ forrest.properties	30 Oct 2004 17:15:42 -0000	1.4
  @@ -14,13 +14,10 @@
   # limitations under the License.
   
   project.name=Tapestry
  -project.build-dir=${project.home}/target/forrest
  -project.site-dir=${project.home}/target/docs
  -project.temp-dir=target/forrest
   
  -project.content-dir=target/forrest-composite
   forrest.echo=on
   project.debuglevel=DEBUG
   
   project.bugtracking-url=http://nagoya.apache.org/jira/browse/
  -# project.skin=jakarta-site
  \ No newline at end of file
  +
  +project.configfile=${project.home}/src/documentation/conf/cli.xconf
  \ No newline at end of file
  
  
  
  1.103     +0 -2      jakarta-tapestry/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/build.xml,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- build.xml	28 Oct 2004 22:24:48 -0000	1.102
  +++ build.xml	30 Oct 2004 17:15:42 -0000	1.103
  @@ -25,12 +25,10 @@
       
   	<import file="${hivebuild.dir}/project.xml"/>
   	<import file="${hivebuild.dir}/license-report.xml"/>    
  -	<import file="${hivebuild.dir}/hivedoc-report.xml"/>  
   	<import file="${hivebuild.dir}/dist.xml"/>
       
     <target name="run-reports">
       <license-report/>
  -    <hivedoc-report/>
     </target>
   
     <path id="jetty.classpath">
  
  
  
  1.5       +4 -1      jakarta-tapestry/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/project.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- project.properties	5 Oct 2004 18:09:59 -0000	1.4
  +++ project.properties	30 Oct 2004 17:15:42 -0000	1.5
  @@ -20,4 +20,7 @@
   
   dist.install.docs.path=public_html/tapestry
   
  -dist.install.maven.path=/www/www.apache.org/dist/java-repository/tapestry/jars
  \ No newline at end of file
  +dist.install.maven.path=/www/www.apache.org/dist/java-repository/tapestry/jars
  +
  +# Jython leaves these lying around
  +dist.project.excludes=**/cachedir/**
  \ No newline at end of file
  
  
  
  1.41      +3 -1      jakarta-tapestry/framework/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/build.xml,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- build.xml	29 Oct 2004 17:14:17 -0000	1.40
  +++ build.xml	30 Oct 2004 17:15:42 -0000	1.41
  @@ -28,6 +28,7 @@
   	<import file="${hivebuild.dir}/jar-module.xml"/>
   	<import file="${hivebuild.dir}/javadoc-report.xml"/>
   	<import file="${hivebuild.dir}/clover-report.xml"/>  
  +	<import file="${hivebuild.dir}/hivedoc-report.xml"/>  
     
   	<target name="compile">
       <ibiblio-dependency artifact="bsf"                version="2.3.0"               group="bsf"/>
  @@ -55,10 +56,11 @@
     <target name="run-reports">
       <javadoc-report/>
       <clover-report/>
  +    <hivedoc-report/>    
     </target>
     
     <target name="marshall-documentation">
  -    <antcall target="forrest.marshall-documentation"/>
  +    <antcall target="forrestdoc.marshall-documentation"/>
       
       <property name="dtd-dir" value="${project.docs.target.dir}/dtd"/>
       <mkdir dir="${dtd-dir}"/>
  
  
  
  1.5       +146 -31   jakarta-tapestry/src/documentation/conf/cli.xconf
  
  Index: cli.xconf
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/conf/cli.xconf,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- cli.xconf	5 Sep 2004 16:55:25 -0000	1.4
  +++ cli.xconf	30 Oct 2004 17:15:42 -0000	1.5
  @@ -1,5 +1,19 @@
   <?xml version="1.0"?>
  +<!--
  +  Copyright 2002-2004 The Apache Software Foundation
   
  +  Licensed under the Apache License, Version 2.0 (the "License");
  +  you may not use this file except in compliance with the License.
  +  You may obtain a copy of the License at
  +
  +      http://www.apache.org/licenses/LICENSE-2.0
  +
  +  Unless required by applicable law or agreed to in writing, software
  +  distributed under the License is distributed on an "AS IS" BASIS,
  +  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +  See the License for the specific language governing permissions and
  +  limitations under the License.
  +-->
   <!--+
       |  This is the Apache Cocoon command line configuration file. 
       |  Here you give the command line interface details of where
  @@ -32,7 +46,8 @@
       |        greater flexibility. If you require a stable and
       |        consistent method for accessing the CLI, it is recommended 
       |        that you use the command line parameters to configure 
  -    |        the CLI.</note>
  +    |        the CLI. See documentation at:
  +    |        /userdocs/offline/index.html and Wiki:CommandLine
       |
       +-->
       
  @@ -49,7 +64,7 @@
          |
          |  The work directory is used by Cocoon to store temporary
          |  files and cache files.
  -       |  
  +       |
          |  The destination directory is where generated pages will
          |  be written (assuming the 'simple' mapper is used, see 
          |  below)
  @@ -57,9 +72,16 @@
      <context-dir>.</context-dir>
      <config-file>WEB-INF/cocoon.xconf</config-file>
      <work-dir>../tmp/cocoon-work</work-dir>
  -   <!-- Overridden in forrest.build.xml 
  -   <dest-dir>../docs</dest-dir>
  -   -->
  +   <dest-dir>../site</dest-dir>
  +   
  +   <!--+
  +       |  A checksum file can be used to store checksums for pages
  +       |  as they are generated. When the site is next generated, 
  +       |  files will not be written if their checksum has not changed.
  +       |  This means that it will be easier to detect which files 
  +       |  need to be uploaded to a server, using the timestamp.
  +       +-->
  +   <!--   <checksums-uri>build/work/checksums</checksums-uri>-->
   
      <!--+
          | Broken link reporting options:
  @@ -76,6 +98,8 @@
          |   extension specifies an extension that should be appended
          |   to the generated page's filename (default: none)
          |
  +       |   Using this, a quick scan through the destination directory
  +       |   will show broken links, by their filename extension.
          +-->
      <broken-links type="xml" 
                    file="../brokenlinks.xml"
  @@ -93,39 +117,109 @@
      -->
   
      <!--+
  -       |
  +       |  Configures logging. 
  +       |  The 'log-kit' parameter specifies the location of the log kit 
  +       |  configuration file (usually called logkit.xconf. 
  +       | 
  +       |  Logger specifies the logging category (for all logging prior 
  +       |  to other Cocoon logging categories taking over)
  +       |
  +       |  Available log levels are:
  +       |    DEBUG:        prints all level of log messages.
  +       |    INFO:         prints all level of log messages except DEBUG 
  +       |                  ones.
  +       |    WARN:         prints all level of log messages except DEBUG 
  +       |                  and INFO ones.
  +       |    ERROR:        prints all level of log messages except DEBUG, 
  +       |                  INFO and WARN ones.
  +       |    FATAL_ERROR:  prints only log messages of this level
          +-->
      <!-- <logging log-kit="WEB-INF/logkit.xconf" logger="cli" level="ERROR" /> -->
   
      <!--+
  -       | Specifies the filename to be appended to URIs that
  -       | refer to a directory (i.e. end with a forward slash).
  +       |  Specifies the filename to be appended to URIs that
  +       |  refer to a directory (i.e. end with a forward slash).
          +-->
      <default-filename>index.html</default-filename>
   
      <!--+
          |  Specifies a user agent string to the sitemap when
          |  generating the site.
  +       |
  +       |  A generic term for a web browser is "user agent". Any 
  +       |  user agent, when connecting to a web server, will provide
  +       |  a string to identify itself (e.g. as Internet Explorer or
  +       |  Mozilla). It is possible to have Cocoon serve different
  +       |  content depending upon the user agent string provided by
  +       |  the browser. If your site does this, then you may want to
  +       |  use this <user-agent> entry to provide a 'fake' user agent
  +       |  to Cocoon, so that it generates the correct version of your
  +       |  site.
  +       | 
  +       |  For most sites, this can be ignored.
          +-->
      <!--
  -   <user-agent>xxx</user-agent>
  +   <user-agent>Cocoon Command Line Environment 2.1</user-agent>
      -->
   
      <!--+
          |  Specifies an accept string to the sitemap when generating
          |  the site.
  +       |  User agents can specify to an HTTP server what types of content
  +       |  (by mime-type) they are able to receive. E.g. a browser may be 
  +       |  able to handle jpegs, but not pngs. The HTTP accept header 
  +       |  allows the server to take the browser's capabilities into account,
  +       |  and only send back content that it can handle.
  +       |
  +       |  For most sites, this can be ignored.
          +-->
  +
      <accept>*/*</accept>
      
      <!--+
  -       |  Specifies the URIs that should be generated (using <uri>
  -       |  elements, and (if necessary) what should be done with the
  -       |  generated pages.
  -       |
  -       |  The old behaviour - appends uri to the specified destination
  -       |  directory (as specified in <dest-dir>):
  -       |
  -       |   <uri>documents/index.html</uri>
  +       | Specifies which URIs should be included or excluded, according
  +       | to wildcard patterns. 
  +       | 
  +       | These includes/excludes are only relevant when you are following
  +       | links. A link URI must match an include pattern (if one is given) 
  +       | and not match an exclude pattern, if it is to be followed by
  +       | Cocoon. It can be useful, for example, where there are links in
  +       | your site to pages that are not generated by Cocoon, such as 
  +       | references to api-documentation.
  +       | 
  +       | By default, all URIs are included. If both include and exclude
  +       | patterns are specified, a URI is first checked against the 
  +       | include patterns, and then against the exclude patterns.
  +       | 
  +       | Multiple patterns can be given, using muliple include or exclude
  +       | nodes. 
  +       | 
  +       | The order of the elements is not significant, as only the first 
  +       | successful match of each category is used.
  +       | 
  +       | Currently, only the complete source URI can be matched (including
  +       | any URI prefix). Future plans include destination URI matching 
  +       | and regexp matching. If you have requirements for these, contact
  +       | dev@cocoon.apache.org.
  +       +-->
  +
  +   <exclude pattern="**/hivedocs/**"/>
  +   <exclude pattern="**/apidocs/**"/>
  +   <exclude pattern="**/clover/**"/>
  +
  +   <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
  +   <exclude pattern="[preferred]/**"/>
  +   <exclude pattern="[location]"/>
  +
  +   
  +   <!--   <include-links extension=".html"/>-->
  +   
  +   <!--+
  +       |  <uri> nodes specify the URIs that should be generated, and 
  +       |  where required, what should be done with the generated pages.
  +       |  They describe the way the URI of the generated file is created
  +       |  from the source page's URI. There are three ways that a generated
  +       |  file URI can be created: append, replace and insert.
          |
          |  The "type" attribute specifies one of (append|replace|insert):
          |
  @@ -167,26 +261,47 @@
          |  the value provided globally using the <dest-dir> node will 
          |  be used instead.
          +-->
  +   <!--
  +   <uri type="replace" 
  +        src-prefix="samples/" 
  +        src="hello-world/hello.html"
  +        dest="build/dest/hello-world.html"/>
  +   -->
   
  -   <!-- Includes and excludes can be used to limit which URLs are rendered -->
  -   <exclude pattern="**/"/>   
  -   
  -   <exclude pattern="hivedocs/**"/>
  -   <exclude pattern="**/apidocs/**"/>
  -   <exclude pattern="**/clover/**"/>
  +   <!--+
  +       | <uri> nodes can be grouped together in a <uris> node. This 
  +       | enables a group of URIs to share properties. The following
  +       | properties can be set for a group of URIs:
  +       |   * follow-links:       should pages be crawled for links
  +       |   * confirm-extensions: should file extensions be checked
  +       |                         for the correct mime type
  +       |   * src-prefix:         all source URIs should be 
  +       |                         pre-pended with this prefix before
  +       |                         generation. The prefix is not 
  +       |                         included when calculating the 
  +       |                         destination URI
  +       |   * dest:               the base destination URI to be
  +       |                         shared by all pages in this group
  +       |   * type:               the method to be used to calculate
  +       |                         the destination URI. See above 
  +       |                         section on <uri> node for details.
  +       | 
  +       | Each <uris> node can have a name attribute. When a name
  +       | attribute has been specified, the -n switch on the command
  +       | line can be used to tell Cocoon to only process the URIs
  +       | within this URI group. When no -n switch is given, all 
  +       | <uris> nodes are processed. Thus, one xconf file can be 
  +       | used to manage multiple sites.
  +       +-->
   
  -   <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
  -   <exclude pattern="[preferred]/**"/>
  -   <exclude pattern="[location]"/>
  -   
  -   <uri src="favicon.ico"/>
  +   <!-- uris name="mirrors" follow-links="false">
  +     <uri type="append" src="mirrors.html"/>
  +   </uris -->
   
      <!--+
          |  File containing URIs (plain text, one per line).
          +-->
      <!--
  -   <uri-file></uri-file>
  +   <uri-file>uris.txt</uri-file>
      -->
  -   
   </cocoon>
  -
  
  
  
  1.9       +2 -2      jakarta-tapestry/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- site.xml	6 Sep 2004 03:06:45 -0000	1.8
  +++ site.xml	30 Oct 2004 17:15:42 -0000	1.9
  @@ -128,10 +128,10 @@
       </info>
   
       
  -	<complete-site label="Complete Site">
  +	<!-- complete-site label="Complete Site">
   		<complete-html label="HTML" href="site.html"/>
   		<!-- complete-pdf label="PDF" href="site.pdf"/ -->
  -	</complete-site>    
  +	</complete-site -->    
       
       <related label="Related Projects">
       	<item label="Spindle" href="http://spindle.sourceforge.net/"/>
  
  
  
  1.2       +323 -95   jakarta-tapestry/src/documentation/skinconf.xml
  
  Index: skinconf.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/skinconf.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- skinconf.xml	3 Sep 2004 17:52:51 -0000	1.1
  +++ skinconf.xml	30 Oct 2004 17:15:42 -0000	1.2
  @@ -1,138 +1,366 @@
   <?xml version="1.0"?>
   <!--
  -   Copyright 2004 The Apache Software Foundation
  -  
  -   Licensed under the Apache License, Version 2.0 (the "License");
  -   you may not use this file except in compliance with the License.
  -   You may obtain a copy of the License at
  -  
  -       http://www.apache.org/licenses/LICENSE-2.0
  -  
  -   Unless required by applicable law or agreed to in writing, software
  -   distributed under the License is distributed on an "AS IS" BASIS,
  -   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  -   See the License for the specific language governing permissions and
  -   limitations under the License.
  +  Copyright 2002-2004 The Apache Software Foundation
  +
  +  Licensed under the Apache License, Version 2.0 (the "License");
  +  you may not use this file except in compliance with the License.
  +  You may obtain a copy of the License at
  +
  +      http://www.apache.org/licenses/LICENSE-2.0
  +
  +  Unless required by applicable law or agreed to in writing, software
  +  distributed under the License is distributed on an "AS IS" BASIS,
  +  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +  See the License for the specific language governing permissions and
  +  limitations under the License.
   -->
  +
   <!--
  -Skin configuration file. This file contains details of your project, which will
  -be used to configure the chosen Forrest skin.
  +Skin configuration file. This file contains details of your project,
  +which will be used to configure the chosen Forrest skin.
   -->
   
  -<!DOCTYPE skinconfig [
  -
  -  <!ENTITY % links.att 'name CDATA #REQUIRED'>
  -  <!ENTITY % link.att 'name CDATA #REQUIRED href CDATA #REQUIRED'>
  -  <!ELEMENT skinconfig (disable-search?, disable-print-link?, disable-pdf-link?,
  -  disable-xml-link?, disable-compliance-links?, searchsite-domain?, searchsite-name?,
  -  project-name, project-url, project-logo, group-name?, group-url?, group-logo?,
  -  host-url?, host-logo?, year?, vendor?, trail?, toc?, credits?)*>
  -  <!ELEMENT credits (credit*)>
  -  <!ELEMENT credit (name, url, image?, width?, height?)>
  -  <!-- id uniquely identifies the tool, and role indicates its function -->
  -  <!ATTLIST credit id   CDATA #IMPLIED
  -                   role CDATA #IMPLIED>
  -  <!ELEMENT disable-search (#PCDATA)>
  -  <!ELEMENT disable-print-link (#PCDATA)>
  -  <!ELEMENT disable-pdf-link (#PCDATA)>
  -  <!ELEMENT disable-xml-link (#PCDATA)>    
  -  <!ELEMENT disable-compliance-links (#PCDATA)>   
  -  <!ELEMENT searchsite-domain (#PCDATA)>
  -  <!ELEMENT searchsite-name (#PCDATA)>  
  -  <!ELEMENT project-name (#PCDATA)>
  -  <!ELEMENT project-url (#PCDATA)>
  -  <!ELEMENT project-logo (#PCDATA)>
  -  <!ELEMENT group-name (#PCDATA)>
  -  <!ELEMENT group-url (#PCDATA)>
  -  <!ELEMENT group-logo (#PCDATA)>
  -  <!ELEMENT host-url (#PCDATA)>
  -  <!ELEMENT host-logo (#PCDATA)>
  -  <!ELEMENT year (#PCDATA)>
  -  <!ELEMENT vendor (#PCDATA)>
  -  <!ELEMENT trail (link1, link2, link3)>
  -  <!ELEMENT link1 EMPTY>
  -  <!-- Seems we can't use param entity refs until this is DTDified -->
  -  <!ATTLIST link1 name CDATA #REQUIRED href CDATA #IMPLIED>
  -  <!ELEMENT link2 EMPTY>
  -  <!ATTLIST link2 name CDATA #REQUIRED href CDATA #IMPLIED>
  -  <!ELEMENT link3 EMPTY>
  -  <!ATTLIST link3 name CDATA #REQUIRED href CDATA #IMPLIED>
  -  <!ELEMENT name (#PCDATA)>
  -  <!ELEMENT url (#PCDATA)>
  -  <!ELEMENT image (#PCDATA)>
  -  <!ELEMENT width (#PCDATA)>
  -  <!ELEMENT height (#PCDATA)>
  -  <!ELEMENT toc EMPTY>
  -  <!ATTLIST toc level CDATA #IMPLIED>
  -  ]>
  -
  +<!DOCTYPE skinconfig PUBLIC "-//APACHE//DTD Skin Configuration V0.6-3//EN" "http://forrest.apache.org/dtd/skinconfig-v06-3.dtd">
   <skinconfig>
  -  <!-- Do we want to disable the Google search box? -->
  -  <disable-search>true</disable-search>
  -  <!-- Do we want to disable the print link? -->
  +  <!-- To enable lucene search add provider="lucene" (default is google).
  +    Add box-location="alt" to move the search box to an alternate location
  +    (if the skin supports it) and box-location="all" to show it in all
  +    available locations on the page.  Remove the <search> element to show
  +    no search box. @domain will enable sitesearch for the specific domain with google.
  +    In other words google will search the @domain for the query string.
  +  -->
  +
  +  <!-- Disable the print link? If enabled, invalid HTML 4.0.1 -->
     <disable-print-link>true</disable-print-link>  
  -  <!-- Do we want to disable the PDF link? -->
  +  <!-- Disable the PDF link? -->
     <disable-pdf-link>true</disable-pdf-link>
  -  <!-- Do we want to disable the xml source link? -->
  +  <!-- Disable the POD link? -->
  +  <disable-pod-link>true</disable-pod-link>
  +  <!-- Disable the Text link? FIXME: NOT YET IMPLEMENETED. -->
  +  <disable-txt-link>true</disable-txt-link>
  +  <!-- Disable the xml source link? -->
  +  <!-- The xml source link makes it possible to access the xml rendition
  +    of the source frim the html page, and to have it generated statically.
  +    This can be used to enable other sites and services to reuse the
  +    xml format for their uses. Keep this disabled if you don't want other
  +    sites to easily reuse your pages.-->
     <disable-xml-link>true</disable-xml-link>
  -  <!-- Do we want to disable w3c compliance links? -->
  +
  +  <!-- Disable navigation icons on all external links? -->
  +  <disable-external-link-image>false</disable-external-link-image>
  +
  +  <!-- Disable w3c compliance links? 
  +    Use e.g. align="center" to move the compliance links logos to 
  +    an alternate location default is left.
  +    (if the skin supports it) -->
     <disable-compliance-links>true</disable-compliance-links>
   
  -  <searchsite-domain>jakarta.apache.org</searchsite-domain>  
  -  <searchsite-name>Jakarta</searchsite-name>  
  +  <!-- Render mailto: links unrecognisable by spam harvesters? -->
  +  <obfuscate-mail-links>true</obfuscate-mail-links>
  +  <obfuscate-mail-value>.at.</obfuscate-mail-value>
  +
  +  <!-- Disable the javascript facility to change the font size -->
  +  <disable-font-script>false</disable-font-script>
   
     <!-- mandatory project logo
  -       skin: forrest-site renders it at the top -->
  -  <project-name>Jakarta Tapestry Project</project-name>
  -  <project-url>http://jakarta.apache.org/tapestry/</project-url>
  -  <project-logo>images/Tapestry-Banner.png</project-logo>
  +       default skin: renders it at the top -->
  +  <project-name>Jakarta</project-name>
  +  <project-description>Apache Jakarta</project-description>
  +  <project-url>http://jakarta.apache.org/</project-url>
  +  <project-logo>images/jakarta-logo.gif</project-logo>
     <!-- Alternative static image:
     <project-logo>images/project-logo.gif</project-logo> -->
   
     <!-- optional group logo
  -       skin: forrest-site renders it at the top-left corner -->
  -  <group-name>The Apache Jakarta Project</group-name>
  -  <group-url>http://jakarta.apache.org/</group-url>
  -  <group-logo>images/jakarta-logo.gif</group-logo>
  +       default skin: renders it at the top-left corner -->
  +  <group-name>Tapestry</group-name>
  +  <group-description>Tapestry Web Application Framework</group-description>
  +  <group-url>http://jakarta.apache.org/hivemind/</group-url>
  +  <group-logo>images/Tapestry-Banner.png</group-logo>
     <!-- Alternative static image:
     <group-logo>images/group-logo.gif</group-logo> -->
   
     <!-- optional host logo (e.g. sourceforge logo)
  -       skin: forrest-site renders it at the bottom-left corner -->
  +       default skin: renders it at the bottom-left corner -->
     <host-url></host-url>
     <host-logo></host-logo>
   
  +  <!-- relative url of a favicon file, normally favicon.ico -->
  +  <favicon-url></favicon-url>
  +
     <!-- The following are used to construct a copyright statement -->
     <year>2004</year>
  -  <vendor>The Apache Software Foundation</vendor>
  +  <vendor>Apache Software Foundation</vendor>
  +  <!-- The optional copyright-link URL will be used as a link in the
  +    copyright statement
  +  <copyright-link>http://www.apache.org/licenses/</copyright-link>
  +  -->
   
  -  <!-- Some skins use this to form a 'breadcrumb trail' of links. If you don't
  -  want these, set the attributes to blank. The DTD purposefully requires them.
  +  <!-- Some skins use this to form a 'breadcrumb trail' of links.
  +    Use location="alt" to move the trail to an alternate location
  +    (if the skin supports it).
  +	  Omit the location attribute to display the trail in the default location.
  +	  Use location="none" to not display the trail (if the skin supports it).
  +    For some skins just set the attributes to blank.
     -->
     <trail>
  -    <link1 name="Apache" href="http://www.apache.org/"/>
  -    <link2 name="Jakarta" href="http://jakarta.apache.org/"/>
  -    <link3 name="Tapestry" href="http://jakarta.apache.org/tapestry/"/>
  +    <link1 name="Jakarta" href="http://jakarta.apache.org/"/>
  +    <link2 name="Tapestry" href="http://jakarta.apache.org/tapestry/"/>
  +    <link3 name="" href=""/>
     </trail>
   
  -  <!-- Configure how many "section" levels need to be included in the
  -  generated Table of Contents (TOC). By default, if no toc element is provided
  -  below, then 2 levels are included. Level 0 does not generate any TOC at all.
  +  <!-- Configure the TOC, i.e. the Table of Contents.
  +  @max-depth
  +   how many "section" levels need to be included in the
  +   generated Table of Contents (TOC). 
  +  @min-sections
  +   Minimum required to create a TOC.
  +  @location ("page","menu","page,menu", "none")
  +   Where to show the TOC.
     -->
  -  <toc level="3"/>
  +  <toc max-depth="2" min-sections="2" location="page"/>
   
  -  <!-- Credits are typically rendered as a set of small clickable images in the
  -  page footer -->
  +  <!-- Heading types can be clean|underlined|boxed  -->
  +  <headings type="boxed"/>
  +  
  +  <!-- The optional feedback element will be used to construct a
  +    feedback link in the footer with the page pathname appended:
  +    <a href="@href">{@to}</a>
  +    -->
  +  <!--  feedback to="webmaster@foo.com"
  +    href="mailto:webmaster@foo.com?subject=Feedback&#160;" >
  +    Send feedback about the website to:
  +  </feedback -->
  +  <!--
  +    extra-css - here you can define custom css-elements that are 
  +    a. overriding the fallback elements or 
  +    b. adding the css definition from new elements that you may have 
  +       used in your documentation.
  +    -->
  +  <extra-css>
  +    <!--Example of b. 
  +        To define the css definition of a new element that you may have used
  +        in the class attribute of a <p> node. 
  +        e.g. <p class="quote"/>
  +    -->
  +    p.quote {
  +      margin-left: 2em;
  +      padding: .5em;
  +      background-color: #f0f0f0;
  +      font-family: monospace;
  +    }
  +    
  +    PRE.code
  +    {
  +      border: solid thin;
  +      padding: 2px;
  +      background-color: #ffffcc;
  +    }
  +  </extra-css>
  +
  +  <colors>
  +  <!-- These values are used for the generated CSS files. -->
  +
  +  <!-- Krysalis -->
  +<!--
  +    <color name="header"    value="#FFFFFF"/>
  +
  +    <color name="tab-selected" value="#a5b6c6" link="#000000" vlink="#000000" hlink="#000000"/>
  +    <color name="tab-unselected" value="#F7F7F7"  link="#000000" vlink="#000000" hlink="#000000"/>
  +    <color name="subtab-selected" value="#a5b6c6"  link="#000000" vlink="#000000" hlink="#000000"/>
  +    <color name="subtab-unselected" value="#a5b6c6"  link="#000000" vlink="#000000" hlink="#000000"/>
  +
  +    <color name="heading" value="#a5b6c6"/>
  +    <color name="subheading" value="#CFDCED"/>
  +        
  +    <color name="navstrip" value="#CFDCED" font="#000000" link="#000000" vlink="#000000" hlink="#000000"/>
  +    <color name="toolbox" value="#a5b6c6"/>
  +    <color name="border" value="#a5b6c6"/>
  +        
  +    <color name="menu" value="#F7F7F7" link="#000000" vlink="#000000" hlink="#000000"/>    
  +    <color name="dialog" value="#F7F7F7"/>
  +            
  +    <color name="body"    value="#ffffff" link="#0F3660" vlink="#009999" hlink="#000066"/>
  +    
  +    <color name="table" value="#a5b6c6"/>    
  +    <color name="table-cell" value="#ffffff"/>    
  +    <color name="highlight" value="#ffff00"/>
  +    <color name="fixme" value="#cc6600"/>
  +    <color name="note" value="#006699"/>
  +    <color name="warning" value="#990000"/>
  +    <color name="code" value="#a5b6c6"/>
  +        
  +    <color name="footer" value="#a5b6c6"/>
  +-->
  +  
  +      <color name="header"    value="#294563"/>
  +      <color name="navstrip"  value="#4a6d8c"/>
  +      <color name="published" value="#4a6d8c" font="#ffffff"/>
  +      
  +  <!-- Forrest -->
  +<!--
  +
  +
  +    <color name="tab-selected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
  +    <color name="tab-unselected" value="#b5c7e7" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
  +    <color name="subtab-selected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
  +    <color name="subtab-unselected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
  +
  +    <color name="heading" value="#294563"/>
  +    <color name="subheading" value="#4a6d8c"/>
  +        
  +    <color name="navstrip" value="#cedfef" font="#0F3660" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
  +    <color name="toolbox" value="#4a6d8c"/>
  +    <color name="border" value="#294563"/>
  +    
  +    <color name="menu" value="#4a6d8c" font="#cedfef" link="#ffffff" vlink="#ffffff" hlink="#ffcf00"/>    
  +    <color name="dialog" value="#4a6d8c"/>
  +            
  +    <color name="body" value="#ffffff"  link="#0F3660" vlink="#009999" hlink="#000066"/>
  +    
  +    <color name="table" value="#7099C5"/>    
  +    <color name="table-cell" value="#f0f0ff"/>    
  +    <color name="highlight" value="#ffff00"/>
  +    <color name="fixme" value="#cc6600"/>
  +    <color name="note" value="#006699"/>
  +    <color name="warning" value="#990000"/>
  +    <color name="code" value="#CFDCED"/>
  +        
  +    <color name="footer" value="#cedfef"/>
  +-->
  +
  +  <!-- Collabnet --> 
  +<!--
  +    <color name="header"    value="#003366"/>
  +
  +    <color name="tab-selected" value="#dddddd" link="#555555" vlink="#555555" hlink="#555555"/>
  +    <color name="tab-unselected" value="#999999" link="#ffffff" vlink="#ffffff" hlink="#ffffff"/>
  +    <color name="subtab-selected" value="#cccccc" link="#000000" vlink="#000000" hlink="#000000"/>
  +    <color name="subtab-unselected" value="#cccccc" link="#555555" vlink="#555555" hlink="#555555"/>
  +
  +    <color name="heading" value="#003366"/>
  +    <color name="subheading" value="#888888"/>
  +    
  +    <color name="navstrip" value="#dddddd" font="#555555"/>
  +    <color name="toolbox" value="#dddddd" font="#555555"/>
  +    <color name="border" value="#999999"/>
  +    
  +    <color name="menu" value="#ffffff"/>    
  +    <color name="dialog" value="#eeeeee"/>
  +            
  +    <color name="body"      value="#ffffff"/>
  +    
  +    <color name="table" value="#ccc"/>    
  +    <color name="table-cell" value="#ffffff"/>   
  +    <color name="highlight" value="#ffff00"/>
  +    <color name="fixme" value="#cc6600"/>
  +    <color name="note" value="#006699"/>
  +    <color name="warning" value="#990000"/>
  +    <color name="code" value="#003366"/>
  +        
  +    <color name="footer" value="#ffffff"/>
  +-->
  + <!-- Lenya using pelt-->
  +<!--
  +    <color name="header" value="#ffffff"/>
  +
  +    <color name="tab-selected" value="#4C6C8F" link="#ffffff" vlink="#ffffff" hlink="#ffffff"/>
  +    <color name="tab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
  +    <color name="subtab-selected" value="#000000" link="#000000" vlink="#000000" hlink="#000000"/>
  +    <color name="subtab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
  +
  +    <color name="heading" value="#E5E4D9"/>
  +    <color name="subheading" value="#000000"/>
  +    <color name="published" value="#4C6C8F" font="#FFFFFF"/>
  +    <color name="feedback" value="#4C6C8F" font="#FFFFFF" align="center"/>
  +    <color name="navstrip" value="#E5E4D9" font="#000000"/>
  +
  +    <color name="toolbox" value="#CFDCED" font="#000000"/>
  +
  +    <color name="border" value="#999999"/>
  +    <color name="menu" value="#4C6C8F" font="#ffffff" link="#ffffff" vlink="#ffffff" hlink="#ffffff" current="#FFCC33" />    
  +    <color name="menuheading" value="#cfdced" font="#000000" />
  +    <color name="searchbox" value="#E5E4D9" font="#000000"/>
  +    
  +    <color name="dialog" value="#CFDCED"/>
  +    <color name="body" value="#ffffff" />            
  +    
  +    <color name="table" value="#ccc"/>    
  +    <color name="table-cell" value="#ffffff"/>   
  +    <color name="highlight" value="#ffff00"/>
  +    <color name="fixme" value="#cc6600"/>
  +    <color name="note" value="#006699"/>
  +    <color name="warning" value="#990000"/>
  +    <color name="code" value="#003366"/>
  +        
  +    <color name="footer" value="#E5E4D9"/>
  +-->
  +  </colors>
  + 
  +  <!-- Settings specific to PDF output. -->
  +  <pdf>
  +    <!-- 
  +       Supported page sizes are a0, a1, a2, a3, a4, a5, executive,
  +       folio, legal, ledger, letter, quarto, tabloid (default letter).
  +       Supported page orientations are portrait, landscape (default
  +       portrait).
  +       Supported text alignments are left, right, justify (default left).
  +    -->
  +    <page size="letter" orientation="portrait" text-align="left"/>
  +
  +    <!--
  +       Margins can be specified for top, bottom, inner, and outer
  +       edges. If double-sided="false", the inner edge is always left
  +       and the outer is always right. If double-sided="true", the
  +       inner edge will be left on odd pages, right on even pages,
  +       the outer edge vice versa.
  +       Specified below are the default settings.
  +    -->
  +    <margins double-sided="false">
  +      <top>1in</top>
  +      <bottom>1in</bottom>
  +      <inner>1.25in</inner>
  +      <outer>1in</outer>
  +    </margins>
  +
  +    <!--
  +      Print the URL text next to all links going outside the file
  +    -->
  +    <show-external-urls>false</show-external-urls>
  +
  +    <!--
  +      Disable the copyright footer on each page of the PDF.
  +      A footer is composed for each page. By default, a "credit" with role=pdf
  +      will be used, as explained below. Otherwise a copyright statement
  +      will be generated. This latter can be disabled.
  +    -->
  +    <disable-copyright-footer>false</disable-copyright-footer>
  +  </pdf>
  +
  +  <!-- Credits are typically rendered as a set of small clickable
  +    images in the page footer.
  +    Use box-location="alt" to move the credit to an alternate location
  +    (if the skin supports it). 
  +  -->
     <credits>
  -    <credit>
  +    <!--
  +    <credit box-location="alt">
         <name>Built with Apache Forrest</name>
  -      <url>http://xml.apache.org/forrest/</url>
  +      <url>http://forrest.apache.org/</url>
         <image>images/built-with-forrest-button.png</image>
         <width>88</width>
         <height>31</height>
       </credit>
  -    <!-- A credit with @role='pdf' will have its name and url displayed in the
  -    PDF page's footer. -->
  +    -->
  +    <!-- A credit with @role="pdf" will be used to compose a footer
  +     for each page in the PDF, using either "name" or "url" or both.
  +    -->
  +    <!--
  +    <credit role="pdf">
  +      <name>Built with Apache Forrest</name>
  +      <url>http://forrest.apache.org/</url>
  +    </credit>
  +    -->
     </credits>
   
   </skinconfig>
  
  
  
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/engine/TestRestartService.java
  
  Index: TestRestartService.java
  ===================================================================
  // Copyright 2004 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.engine;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
  
  import org.apache.commons.logging.Log;
  import org.apache.tapestry.engine.RestartService;
  import org.apache.tapestry.junit.TapestryTestCase;
  import org.apache.tapestry.services.AbsoluteURLBuilder;
  import org.easymock.MockControl;
  
  /**
   * Tests for {@link org.apache.tapestry.engine.RestartService}.
   * 
   * @author Howard M. Lewis Ship
   * @since 3.1
   */
  public class TestRestartService extends TapestryTestCase
  {
      public void testNoSession() throws Exception
      {
          MockControl requestControl = newControl(HttpServletRequest.class);
          HttpServletRequest request = (HttpServletRequest) requestControl.getMock();
  
          HttpServletResponse response = (HttpServletResponse) newMock(HttpServletResponse.class);
  
          MockControl builderControl = newControl(AbsoluteURLBuilder.class);
          AbsoluteURLBuilder builder = (AbsoluteURLBuilder) builderControl.getMock();
  
          // Training
  
          request.getSession();
          requestControl.setReturnValue(null);
  
          request.getServletPath();
          requestControl.setReturnValue("/app");
  
          builder.constructURL("/app");
          builderControl.setReturnValue("http://myserver/app");
  
          response.sendRedirect("http://myserver/app");
  
          replayControls();
  
          RestartService s = new RestartService();
          s.setBuilder(builder);
          s.setRequest(request);
          s.setResponse(response);
  
          s.service(null, null);
  
          verifyControls();
      }
  
      public void testWithSession() throws Exception
      {
          MockControl requestControl = newControl(HttpServletRequest.class);
          HttpServletRequest request = (HttpServletRequest) requestControl.getMock();
  
          HttpServletResponse response = (HttpServletResponse) newMock(HttpServletResponse.class);
  
          MockControl builderControl = newControl(AbsoluteURLBuilder.class);
          AbsoluteURLBuilder builder = (AbsoluteURLBuilder) builderControl.getMock();
  
          HttpSession session = (HttpSession) newMock(HttpSession.class);
  
          // Training
  
          request.getSession();
          requestControl.setReturnValue(session);
  
          session.invalidate();
  
          request.getServletPath();
          requestControl.setReturnValue("/app");
  
          builder.constructURL("/app");
          builderControl.setReturnValue("http://myserver/app");
  
          response.sendRedirect("http://myserver/app");
  
          replayControls();
  
          RestartService s = new RestartService();
          s.setBuilder(builder);
          s.setRequest(request);
          s.setResponse(response);
  
          s.service(null, null);
  
          verifyControls();
      }
  
      public void testErrorInvalidatingSession() throws Exception
      {
          MockControl requestControl = newControl(HttpServletRequest.class);
          HttpServletRequest request = (HttpServletRequest) requestControl.getMock();
  
          HttpServletResponse response = (HttpServletResponse) newMock(HttpServletResponse.class);
  
          MockControl builderControl = newControl(AbsoluteURLBuilder.class);
          AbsoluteURLBuilder builder = (AbsoluteURLBuilder) builderControl.getMock();
  
          MockControl sessionControl = newControl(HttpSession.class);
          HttpSession session = (HttpSession) sessionControl.getMock();
  
          Log log = (Log) newMock(Log.class);
  
          IllegalStateException ex = new IllegalStateException();
  
          // Training
  
          request.getSession();
          requestControl.setReturnValue(session);
  
          session.invalidate();
          sessionControl.setThrowable(ex);
  
          log.warn("Exception thrown invalidating HttpSession.", ex);
  
          request.getServletPath();
          requestControl.setReturnValue("/app");
  
          builder.constructURL("/app");
          builderControl.setReturnValue("http://myserver/app");
  
          response.sendRedirect("http://myserver/app");
  
          replayControls();
  
          RestartService s = new RestartService();
          s.setBuilder(builder);
          s.setRequest(request);
          s.setResponse(response);
          s.setLog(log);
  
          s.service(null, null);
  
          verifyControls();
      }
  
  }
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org