commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core ThreadTag.java GetStaticTag.java OtherwiseTag.java CatchTag.java CaseTag.java UseListTag.java WhenTag.java DefaultTag.java WhileTag.java WhitespaceTag.java ArgTagParent.java ChooseTag.java UseBeanTag.java SwitchTag.java IncludeTag.java ArgTag.java JellyTag.java SetPropertiesTag.java NewTag.java ImportTag.java BaseClassLoaderTag.java IfTag.java ExprTag.java ForEachTag.java RemoveTag.java ScopeTag.java
Date Thu, 09 Sep 2004 12:27:55 GMT
dion        2004/09/09 05:27:55

  Modified:    jelly/src/java/org/apache/commons/jelly/tags/core
                        ThreadTag.java GetStaticTag.java OtherwiseTag.java
                        CatchTag.java CaseTag.java UseListTag.java
                        WhenTag.java DefaultTag.java WhileTag.java
                        WhitespaceTag.java ArgTagParent.java ChooseTag.java
                        UseBeanTag.java SwitchTag.java IncludeTag.java
                        ArgTag.java JellyTag.java SetPropertiesTag.java
                        NewTag.java ImportTag.java BaseClassLoaderTag.java
                        IfTag.java ExprTag.java ForEachTag.java
                        RemoveTag.java ScopeTag.java
  Log:
  Fix license file whitespace
  
  Revision  Changes    Path
  1.13      +7 -7      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ThreadTag.java
  
  Index: ThreadTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ThreadTag.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ThreadTag.java	2 Sep 2004 07:18:40 -0000	1.12
  +++ ThreadTag.java	9 Sep 2004 12:27:53 -0000	1.13
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -44,7 +44,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(final XMLOutput output) throws JellyTagException {
           if ( xmlOutput == null ) {
               // lets default to system.out
  @@ -57,7 +57,7 @@
   
           // lets create a child context
           final JellyContext newContext = context.newJellyContext();
  -                
  +
           Thread thread = new Thread(
               new Runnable() {
                   public void run() {
  @@ -81,7 +81,7 @@
           }
           thread.start();
       }
  -    
  +
       /**
        * Sets the name of the thread.
        * @param name The name to set
  @@ -97,7 +97,7 @@
           this.closeOutput = false;
           this.xmlOutput = xmlOutput;
       }
  -    
  +
       /**
        * Set the file which is generated from the output
        * @param name The output file name
  
  
  
  1.2       +8 -8      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/GetStaticTag.java
  
  Index: GetStaticTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/GetStaticTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GetStaticTag.java	5 Jun 2004 02:23:41 -0000	1.1
  +++ GetStaticTag.java	9 Sep 2004 12:27:53 -0000	1.2
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -22,7 +22,7 @@
   import org.apache.commons.jelly.XMLOutput;
   
   
  -/** 
  +/**
    * A tag which can retrieve the value of a static field of a given class.
    * The following attributes are required:<br />
    * <ul>
  @@ -34,7 +34,7 @@
    * Example usage:
    * <pre>
    * &lt;j:getStatic var="closeOperation" className="javax.swing.JFrame"
  - *              field="EXIT_ON_CLOSE"/&gt; 
  + *              field="EXIT_ON_CLOSE"/&gt;
    * </pre>
    *
    * @version $Revision$
  @@ -52,7 +52,7 @@
       private String className;
   
   
  -    /** 
  +    /**
        * Sets the name of the variable exported by this tag.
        *
        * @param var The variable name.
  @@ -86,7 +86,7 @@
   
   
       // Tag interface
  -    //------------------------------------------------------------------------ 
  +    //------------------------------------------------------------------------
   
       public void doTag(XMLOutput output) throws JellyTagException {
           String message = null;
  
  
  
  1.13      +5 -5      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/OtherwiseTag.java
  
  Index: OtherwiseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/OtherwiseTag.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- OtherwiseTag.java	24 Feb 2004 14:10:38 -0000	1.12
  +++ OtherwiseTag.java	9 Sep 2004 12:27:53 -0000	1.13
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -30,7 +30,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           ChooseTag tag = (ChooseTag) findAncestorWithClass( ChooseTag.class );
           if ( tag == null ) {
  
  
  
  1.7       +7 -7      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/CatchTag.java
  
  Index: CatchTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/CatchTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CatchTag.java	24 Feb 2004 14:10:38 -0000	1.6
  +++ CatchTag.java	9 Sep 2004 12:27:53 -0000	1.7
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -19,7 +19,7 @@
   import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
   
  -/** 
  +/**
    * A tag which catches exceptions thrown by its body.
    * This allows conditional logic to be performed based on if exceptions
    * are thrown or to do some kind of custom exception logging logic.
  @@ -35,7 +35,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           if (var != null) {
               context.removeVariable(var);
  @@ -51,8 +51,8 @@
       }
   
       // Properties
  -    //------------------------------------------------------------------------- 
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Sets the name of the variable which is exposed with the Exception that gets
        * thrown by evaluating the body of this tag or which is set to null if there is
  
  
  
  1.8       +20 -20    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/CaseTag.java
  
  Index: CaseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/CaseTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CaseTag.java	24 Feb 2004 14:10:38 -0000	1.7
  +++ CaseTag.java	9 Sep 2004 12:27:53 -0000	1.8
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -21,17 +21,17 @@
   import org.apache.commons.jelly.XMLOutput;
   import org.apache.commons.jelly.expression.Expression;
   
  -/** 
  +/**
    * A tag which conditionally evaluates its body if
    * my {@link #setValue value} attribute equals my ancestor
  - * {@link SwitchTag &lt;switch&gt;} tag's 
  + * {@link SwitchTag &lt;switch&gt;} tag's
    * {@link SwitchTag#setOn "on"} attribute.
  - * 
  - * This tag must be contained within the body of some 
  + *
  + * This tag must be contained within the body of some
    * {@link SwitchTag &lt;switch&gt;} tag.
  - * 
  + *
    * @see SwitchTag
  - * 
  + *
    * @author Rodney Waldhoff
    * @version $Revision$ $Date$
    */
  @@ -39,21 +39,21 @@
   
       public CaseTag() {
       }
  -    
  +
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void setValue(Expression value) {
           this.valueExpression = value;
       }
  -    
  +
       public void setFallThru(boolean fallThru) {
           this.fallThru = fallThru;
       }
  -    
  +
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if(null == this.valueExpression) {
               throw new MissingAttributeException("value");
  -        }        
  +        }
           SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class);
           if(null == tag) {
               throw new JellyTagException("This tag must be enclosed inside a <switch> tag" );
  @@ -61,18 +61,18 @@
           if(tag.hasDefaultBeenEncountered()) {
               throw new JellyTagException("<default> should be the last tag within a <switch>" );
           }
  -        Object value = valueExpression.evaluate(context);        
  -        if(tag.isFallingThru() || 
  -           (null == tag.getValue() && null == value) || 
  +        Object value = valueExpression.evaluate(context);
  +        if(tag.isFallingThru() ||
  +           (null == tag.getValue() && null == value) ||
              (null != tag.getValue() && tag.getValue().equals(value))) {
               tag.caseMatched();
               tag.setFallingThru(fallThru);
               invokeBody(output);
           }
       }
  -    
  +
       // Attributes
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       private Expression valueExpression = null;
       private boolean fallThru = false;
   
  
  
  
  1.11      +17 -17    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/UseListTag.java
  
  Index: UseListTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/UseListTag.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- UseListTag.java	24 Feb 2004 14:10:38 -0000	1.10
  +++ UseListTag.java	9 Sep 2004 12:27:53 -0000	1.11
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -24,36 +24,36 @@
   import org.apache.commons.jelly.expression.Expression;
   import org.apache.commons.jelly.impl.CollectionTag;
   
  -/** 
  - * A tag which creates a List implementation and optionally 
  +/**
  + * A tag which creates a List implementation and optionally
    * adds all of the elements identified by the items attribute.
  - * The exact implementation of List can be specified via the 
  + * The exact implementation of List can be specified via the
    * class attribute
    * </pre>
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
   public class UseListTag extends UseBeanTag implements CollectionTag {
   
       private Expression items;
  -    
  +
       public UseListTag(){
       }
   
       public List getList() {
           return (List) getBean();
       }
  -    
  +
   
       // CollectionTag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void addItem(Object value) {
           getList().add(value);
       }
  -    
  +
       // DynaTag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public Class getAttributeType(String name) throws JellyTagException {
           if (name.equals("items")) {
               return Expression.class;
  @@ -63,16 +63,16 @@
   
   
       // Implementation methods
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       protected void setBeanProperties(Object bean, Map attributes) throws JellyTagException {
           items = (Expression) attributes.remove("items");
           super.setBeanProperties(bean, attributes);
       }
  -    
  +
       protected void processBean(String var, Object bean) throws JellyTagException {
           super.processBean(var, bean);
  -        
  +
           List list = getList();
   
           // if the items variable is specified lets append all the items
  @@ -83,7 +83,7 @@
               }
           }
       }
  -    
  +
       protected Class getDefaultClass() {
           return ArrayList.class;
       }
  
  
  
  1.15      +9 -9      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/WhenTag.java
  
  Index: WhenTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/WhenTag.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WhenTag.java	24 Feb 2004 14:10:38 -0000	1.14
  +++ WhenTag.java	9 Sep 2004 12:27:53 -0000	1.15
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -28,13 +28,13 @@
   public class WhenTag extends TagSupport {
   
       /** The expression to evaluate. */
  -    private Expression test;        
  +    private Expression test;
   
       public WhenTag() {
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           ChooseTag tag = (ChooseTag) findAncestorWithClass( ChooseTag.class );
           if ( tag == null ) {
  @@ -49,11 +49,11 @@
       }
   
       // Properties
  -    //-------------------------------------------------------------------------                
  -    
  +    //-------------------------------------------------------------------------
  +
       /** Sets the expression to evaluate. */
       public void setTest(Expression test) {
           this.test = test;
       }
  -    
  +
   }
  
  
  
  1.8       +17 -17    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/DefaultTag.java
  
  Index: DefaultTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/DefaultTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultTag.java	24 Feb 2004 14:10:38 -0000	1.7
  +++ DefaultTag.java	9 Sep 2004 12:27:53 -0000	1.8
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -20,16 +20,16 @@
   import org.apache.commons.jelly.XMLOutput;
   
   
  -/** 
  +/**
    * A tag which conditionally evaluates its body if
  - * none of its preceeding sibling {@link CaseTag &lt;case&gt;} 
  + * none of its preceeding sibling {@link CaseTag &lt;case&gt;}
    * tags have been evaluated.
  - * 
  - * This tag must be contained within the body of some 
  + *
  + * This tag must be contained within the body of some
    * {@link SwitchTag &lt;switch&gt;} tag.
  - * 
  + *
    * @see SwitchTag
  - * 
  + *
    * @author Rodney Waldhoff
    * @version $Revision$ $Date$
    */
  @@ -37,19 +37,19 @@
   
       public DefaultTag() {
       }
  -    
  +
       // Tag interface
  -    //------------------------------------------------------------------------- 
  -    
  +    //-------------------------------------------------------------------------
  +
       public void setFallThru(boolean fallThru) {
           this.fallThru = fallThru;
       }
  -    
  +
       public void doTag(XMLOutput output) throws JellyTagException {
           SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class);
           if(null == tag) {
               throw new JellyTagException("This tag must be enclosed inside a <switch> tag" );
  -        }        
  +        }
           if(tag.hasDefaultBeenEncountered()) {
               throw new JellyTagException("Only one <default> tag is allowed per <switch>.");
           }
  @@ -62,7 +62,7 @@
       }
   
       // Attributes
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       private boolean fallThru = false;
  -    
  +
   }
  
  
  
  1.9       +4 -4      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/WhileTag.java
  
  Index: WhileTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/WhileTag.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- WhileTag.java	24 Feb 2004 14:10:38 -0000	1.8
  +++ WhileTag.java	9 Sep 2004 12:27:53 -0000	1.9
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -67,7 +67,7 @@
                       log.debug("loop terminated by break: " + e, e);
                   }
               }
  -        } 
  +        }
           else {
               throw new MissingAttributeException("test");
           }
  
  
  
  1.8       +6 -6      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/WhitespaceTag.java
  
  Index: WhitespaceTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/WhitespaceTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WhitespaceTag.java	24 Feb 2004 14:10:38 -0000	1.7
  +++ WhitespaceTag.java	9 Sep 2004 12:27:53 -0000	1.8
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -22,7 +22,7 @@
   import org.apache.commons.logging.LogFactory;
   
   
  -/** 
  +/**
    * A simple tag used to preserve whitespace inside its body
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -38,7 +38,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
   
           if ( log.isDebugEnabled() ) {
  @@ -48,4 +48,4 @@
       }
   
   }
  -    
  +
  
  
  
  1.4       +4 -4      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ArgTagParent.java
  
  Index: ArgTagParent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ArgTagParent.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ArgTagParent.java	24 Feb 2004 14:10:38 -0000	1.3
  +++ ArgTagParent.java	9 Sep 2004 12:27:53 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * 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.
  
  
  
  1.12      +7 -7      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ChooseTag.java
  
  Index: ChooseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ChooseTag.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ChooseTag.java	24 Feb 2004 14:10:38 -0000	1.11
  +++ ChooseTag.java	9 Sep 2004 12:27:53 -0000	1.12
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -32,16 +32,16 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           setBlockEvaluated(false);
           invokeBody(output);
       }
  -    
  +
       protected boolean isBlockEvaluated() {
           return blockEvaluated;
       }
  -    
  +
       protected void setBlockEvaluated(boolean blockEvaluated) {
           this.blockEvaluated = blockEvaluated;
       }
  
  
  
  1.18      +34 -34    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/UseBeanTag.java
  
  Index: UseBeanTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/UseBeanTag.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- UseBeanTag.java	31 Aug 2004 05:16:15 -0000	1.17
  +++ UseBeanTag.java	9 Sep 2004 12:27:53 -0000	1.18
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -30,20 +30,20 @@
   import org.apache.commons.jelly.XMLOutput;
   import org.apache.commons.jelly.impl.BeanSource;
   
  -/** 
  +/**
    * A tag which instantiates an instance of the given class
    * and then sets the properties on the bean.
    * The class can be specified via a {@link java.lang.Class} instance or
    * a String which will be used to load the class using either the current
    * thread's context class loader or the class loader used to load this
    * Jelly library.
  - * 
  - * This tag can be used it as follows, 
  + *
  + * This tag can be used it as follows,
    * <pre>
    * &lt;j:useBean var="person" class="com.acme.Person" name="James" location="${loc}"/&gt;
    * &lt;j:useBean var="order" class="${orderClass}" amount="12" price="123.456"/&gt;
    * </pre>
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  @@ -51,7 +51,7 @@
   
       /** the current bean instance */
       private Object bean;
  -    
  +
       /** the default class to use if no Class is specified */
       private Class defaultClass;
   
  @@ -60,8 +60,8 @@
        * Map of attributes before passing to ConvertUtils)
        */
       private Set ignoreProperties;
  -    
  -    /** 
  +
  +    /**
        * If this tag finds an attribute in the XML that's not
        * ignored by {@link #ignoreProperties} and isn't a
        * bean property, should it throw an exception?
  @@ -78,10 +78,10 @@
       }
   
       // BeanSource interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
   
       /**
  -     * @return the bean that has just been created 
  +     * @return the bean that has just been created
        */
       public Object getBean() {
           return bean;
  @@ -89,33 +89,33 @@
   
   
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           Map attributes = getAttributes();
           String var = (String) attributes.get( "var" );
           Object classObject = attributes.get( "class" );
           addIgnoreProperty("class");
           addIgnoreProperty("var");
  -        
  +
           try {
               // this method could return null in derived classes
               Class theClass = convertToClass(classObject);
  -            
  +
               bean = newInstance(theClass, attributes, output);
               setBeanProperties(bean, attributes);
  -        
  +
               // invoke body which could result in other properties being set
               invokeBody(output);
  -            
  +
               processBean(var, bean);
  -        } 
  +        }
           catch (ClassNotFoundException e) {
               throw new JellyTagException(e);
           }
       }
   
       // Implementation methods
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
   
       /**
        * Allow derived classes to programatically set the bean
  @@ -123,14 +123,14 @@
       protected void setBean(Object bean) {
           this.bean = bean;
       }
  -    
  +
       /**
        * Attempts to convert the given object to a Class instance.
  -     * If the classObject is already a Class it will be returned 
  +     * If the classObject is already a Class it will be returned
        * otherwise it will be converted to a String and loaded
        * using the default class loading mechanism.
        */
  -    protected Class convertToClass(Object classObject) 
  +    protected Class convertToClass(Object classObject)
       throws MissingAttributeException, ClassNotFoundException {
           if (classObject instanceof Class) {
               return (Class) classObject;
  @@ -152,7 +152,7 @@
        * Loads the given class using the default class loading mechanism
        * which is to try use the current Thread's context class loader first
        * otherise use the class loader which loaded this class.
  -     */    
  +     */
       protected Class loadClass(String className) throws ClassNotFoundException {
           try {
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
  @@ -164,13 +164,13 @@
               return getClass().getClassLoader().loadClass(className);
           }
       }
  -    
  +
       /**
        * Creates a new instance of the given class, which by default will invoke the
        * default constructor.
        * Derived tags could do something different here.
        */
  -    protected Object newInstance(Class theClass, Map attributes, XMLOutput output) 
  +    protected Object newInstance(Class theClass, Map attributes, XMLOutput output)
       throws JellyTagException {
           try {
               return theClass.newInstance();
  @@ -180,9 +180,9 @@
               throw new JellyTagException(e.toString());
           }
       }
  -    
  +
       /**
  -     * Sets the properties on the bean. Derived tags could implement some custom 
  +     * Sets the properties on the bean. Derived tags could implement some custom
        * type conversion etc.
        * <p/>
        * This method ignores all property names in the Set returned by {@link #getIgnorePropertySet()}.
  @@ -190,9 +190,9 @@
       protected void setBeanProperties(Object bean, Map attributes) throws JellyTagException {
           Map attrsToUse = new HashMap(attributes);
           attrsToUse.keySet().removeAll(getIgnorePropertySet());
  -           
  +
           validateBeanProperties(bean, attrsToUse);
  -        
  +
           try {
               BeanUtils.populate(bean, attrsToUse);
           } catch (IllegalAccessException e) {
  @@ -201,7 +201,7 @@
               throw new JellyTagException("could not set the properties of the bean",e);
           }
       }
  -    
  +
       /**
        * If {@link #isIgnoreUnknownProperties()} returns true, make sure that
        * every non-ignored ({@see #addIgnoreProperty(String)}) property
  @@ -229,7 +229,7 @@
       protected void processBean(String var, Object bean) throws JellyTagException {
           if (var != null) {
               context.setVariable(var, bean);
  -        } 
  +        }
           else {
               ArgTag parentArg = (ArgTag)(findAncestorWithClass(ArgTag.class));
               if(null != parentArg) {
  @@ -237,7 +237,7 @@
               }
           }
       }
  -    
  +
       /**
        * Allows derived classes to provide a default bean implementation class
        */
  @@ -266,7 +266,7 @@
   
           return ignoreProperties;
       }
  -    
  +
       /**
        * @see {@link #setIgnoreUnknownProperties(boolean)}
        * @return
  @@ -274,7 +274,7 @@
       public boolean isIgnoreUnknownProperties() {
           return ignoreUnknownProperties;
       }
  -    
  +
       /**
        * If this tag finds an attribute in the XML that's not
        * ignored by {@link #ignoreProperties} and isn't a
  
  
  
  1.7       +20 -20    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/SwitchTag.java
  
  Index: SwitchTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/SwitchTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SwitchTag.java	24 Feb 2004 14:10:38 -0000	1.6
  +++ SwitchTag.java	9 Sep 2004 12:27:53 -0000	1.7
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -22,14 +22,14 @@
   import org.apache.commons.jelly.expression.Expression;
   
   
  -/** 
  +/**
    * Executes the child &lt;case&gt; tag whose value equals my on attribute.
    * Executes a child &lt;default&gt; tag when present and no &lt;case&gt; tag has
    * yet matched.
  - * 
  + *
    * @see CaseTag
    * @see DefaultTag
  - * 
  + *
    * @author Rodney Waldhoff
    * @version $Revision$ $Date$
    */
  @@ -37,20 +37,20 @@
   
       public SwitchTag() {
       }
  -    
  +
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
   
       /**
        * Sets the value to switch on.
  -     * Note that the {@link Expression} is evaluated only once, when the 
  +     * Note that the {@link Expression} is evaluated only once, when the
        * &lt;switch&gt; tag is evaluated.
        * @param on the value to switch on
        */
       public void setOn(Expression on) {
           this.on = on;
       }
  -    
  +
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if(null == on) {
               throw new MissingAttributeException("on");
  @@ -59,31 +59,31 @@
               invokeBody(output);
           }
       }
  -    
  +
       // Protected properties
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       protected boolean hasSomeCaseMatched() {
           return this.someCaseMatched;
       }
  -    
  +
       protected void caseMatched() {
           this.someCaseMatched = true;
       }
  -    
  +
       protected boolean isFallingThru() {
           return this.fallingThru;
       }
  -    
  +
       protected void setFallingThru(boolean fallingThru) {
           this.fallingThru = fallingThru;
       }
  -    
  +
       protected Object getValue() {
  -        return value;        
  +        return value;
       }
   
       protected boolean hasDefaultBeenEncountered() {
  -        return defaultEncountered;        
  +        return defaultEncountered;
       }
   
       protected void defaultEncountered() {
  @@ -91,7 +91,7 @@
       }
   
       // Attributes
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       private boolean someCaseMatched = false;
       private boolean fallingThru = false;
       private boolean defaultEncountered = false;
  
  
  
  1.16      +6 -6      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/IncludeTag.java
  
  Index: IncludeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/IncludeTag.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- IncludeTag.java	27 Aug 2004 05:23:27 -0000	1.15
  +++ IncludeTag.java	9 Sep 2004 12:27:53 -0000	1.16
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -84,7 +84,7 @@
   
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output)
           throws MissingAttributeException, JellyTagException {
   
  @@ -111,7 +111,7 @@
       }
   
       // Properties
  -    //-------------------------------------------------------------------------                
  +    //-------------------------------------------------------------------------
       /** Sets the URI (relative URI or absolute URL) for the script to evaluate. */
       public void setUri(String uri) {
           this.uri = uri;
  
  
  
  1.9       +38 -38    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ArgTag.java
  
  Index: ArgTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ArgTag.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ArgTag.java	24 Feb 2004 14:10:38 -0000	1.8
  +++ ArgTag.java	9 Sep 2004 12:27:53 -0000	1.9
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -31,9 +31,9 @@
   import org.apache.commons.jelly.JellyTagException;
   import org.apache.commons.jelly.XMLOutput;
   
  -/** 
  +/**
    * An argument to a {@link NewTag} or {@link InvokeTag}.
  - * This tag MUST be enclosed within an {@link ArgTagParent} 
  + * This tag MUST be enclosed within an {@link ArgTagParent}
    * implementation.
    *
    * @author Rodney Waldhoff
  @@ -43,23 +43,23 @@
   
       // constructors
       //-------------------------------------------------------------------------
  -    
  +
       public ArgTag() {
       }
   
       // attribute setters
       //-------------------------------------------------------------------------
   
  -    /** 
  -     * The name of the argument class or type, if any. 
  -     * This may be a fully specified class name or 
  +    /**
  +     * The name of the argument class or type, if any.
  +     * This may be a fully specified class name or
        * a primitive type name
        * (<code>boolean<code>, <code>int</code>, <code>double</code>, etc.).
        */
       public void setType(String type) {
           this.typeString = type;
       }
  -    
  +
       /** The (possibly null) value of this argument. */
       public void setValue(Object value) {
           this.value= value;
  @@ -72,9 +72,9 @@
           invokeBody(output);
   
           Class klass = null;
  -        if("boolean".equals(typeString)) {                
  +        if("boolean".equals(typeString)) {
               klass = Boolean.TYPE;
  -            assertNotNull(value);            
  +            assertNotNull(value);
           } else if("byte".equals(typeString)) {
               klass = Byte.TYPE;
               assertNotNull(value);
  @@ -122,10 +122,10 @@
                   value = convert(klass,value);
               }
           }
  -        
  +
           ArgTagParent parent = (ArgTagParent)findAncestorWithClass(ArgTagParent.class);
           if(null == parent) {
  -            throw new JellyTagException("This tag must be enclosed inside an ArgTagParent implementation (for example, <new> or <invoke>)" );        
  +            throw new JellyTagException("This tag must be enclosed inside an ArgTagParent implementation (for example, <new> or <invoke>)" );
           } else {
               parent.addArgument(klass,value);
           }
  @@ -149,7 +149,7 @@
   
       /** The name of the parameter type, if any. */
       private String typeString;
  -    
  +
       /** The value of the parameter, if any */
       private Object value;
   
  @@ -161,7 +161,7 @@
               return null;
           } else if(!klass.isInstance(value)) {
               Converter converter = (Converter)(converterMap.get(klass));
  -            if(null == converter) { 
  +            if(null == converter) {
                   throw new JellyTagException("Can't convert " + value + " to " + klass);
               } else {
                   try {
  @@ -173,9 +173,9 @@
           } else {
               return value;
           }
  -        
  +
       }
  -        
  +
       /** My bag of converters, by target Class */
       private static Map converterMap = new HashMap();
       // these inner classes should probably move to beanutils
  @@ -197,9 +197,9 @@
                           return new Byte(((Number)value).byteValue());
                       } else {
                           return inner.convert(klass,value);
  -                    }                        
  -                }           
  -                private Converter inner = new ByteConverter();     
  +                    }
  +                }
  +                private Converter inner = new ByteConverter();
               };
               converterMap.put(Byte.TYPE,c);
               converterMap.put(Byte.class,c);
  @@ -211,9 +211,9 @@
                           return new Short(((Number)value).shortValue());
                       } else {
                           return inner.convert(klass,value);
  -                    }                        
  -                }           
  -                private Converter inner = new ShortConverter();     
  +                    }
  +                }
  +                private Converter inner = new ShortConverter();
               };
               converterMap.put(Short.TYPE,c);
               converterMap.put(Short.class,c);
  @@ -225,9 +225,9 @@
                           return new Integer(((Number)value).intValue());
                       } else {
                           return inner.convert(klass,value);
  -                    }                        
  -                }           
  -                private Converter inner = new IntegerConverter();     
  +                    }
  +                }
  +                private Converter inner = new IntegerConverter();
               };
               converterMap.put(Integer.TYPE,c);
               converterMap.put(Integer.class,c);
  @@ -239,9 +239,9 @@
                           return new Long(((Number)value).longValue());
                       } else {
                           return inner.convert(klass,value);
  -                    }                        
  -                }           
  -                private Converter inner = new LongConverter();     
  +                    }
  +                }
  +                private Converter inner = new LongConverter();
               };
               converterMap.put(Long.TYPE,c);
               converterMap.put(Long.class,c);
  @@ -253,9 +253,9 @@
                           return new Float(((Number)value).floatValue());
                       } else {
                           return inner.convert(klass,value);
  -                    }                        
  -                }           
  -                private Converter inner = new FloatConverter();     
  +                    }
  +                }
  +                private Converter inner = new FloatConverter();
               };
               converterMap.put(Float.TYPE,c);
               converterMap.put(Float.class,c);
  @@ -267,12 +267,12 @@
                           return new Double(((Number)value).doubleValue());
                       } else {
                           return inner.convert(klass,value);
  -                    }                        
  -                }           
  -                private Converter inner = new DoubleConverter();     
  +                    }
  +                }
  +                private Converter inner = new DoubleConverter();
               };
               converterMap.put(Double.TYPE,c);
               converterMap.put(Double.class,c);
  -        }       
  +        }
       }
   }
  
  
  
  1.14      +8 -8      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/JellyTag.java
  
  Index: JellyTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/JellyTag.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- JellyTag.java	24 Feb 2004 14:10:38 -0000	1.13
  +++ JellyTag.java	9 Sep 2004 12:27:53 -0000	1.14
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -36,7 +36,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
   
           if ( log.isDebugEnabled() ) {
  @@ -46,7 +46,7 @@
       }
   
       // Properties
  -    //-------------------------------------------------------------------------                
  -    
  +    //-------------------------------------------------------------------------
  +
   }
  -    
  +
  
  
  
  1.8       +9 -9      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/SetPropertiesTag.java
  
  Index: SetPropertiesTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/SetPropertiesTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SetPropertiesTag.java	24 Feb 2004 14:10:38 -0000	1.7
  +++ SetPropertiesTag.java	9 Sep 2004 12:27:53 -0000	1.8
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -27,7 +27,7 @@
   import org.apache.commons.jelly.XMLOutput;
   import org.apache.commons.jelly.impl.BeanSource;
   
  -/** 
  +/**
    * A tag which sets the bean properties on the given bean.
    * So if you used it as follows, for example using the &lt;j:new&gt; tag.
    * <pre>
  @@ -40,7 +40,7 @@
    * This tag can also be nested inside a bean tag such as the &lt;useBean&gt; tag
    * or a JellySwing tag to set one or more properties, maybe inside some conditional
    * logic.
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  @@ -50,7 +50,7 @@
       }
   
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           Map attributes = getAttributes();
           Object bean = attributes.remove( "object" );
  @@ -72,10 +72,10 @@
       }
   
       // Implementation methods
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
  -     * Sets the properties on the bean. Derived tags could implement some custom 
  +     * Sets the properties on the bean. Derived tags could implement some custom
        * type conversion etc.
        */
       protected void setBeanProperties(Object bean, Map attributes) throws JellyTagException {
  
  
  
  1.10      +12 -12    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/NewTag.java
  
  Index: NewTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/NewTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- NewTag.java	24 Feb 2004 14:10:38 -0000	1.9
  +++ NewTag.java	9 Sep 2004 12:27:53 -0000	1.10
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -33,13 +33,13 @@
   
       /** the variable exported */
       private String var;
  -    
  +
       /** the class name of the object to instantiate */
       private String className;
  -    
  +
       private List paramTypes = new ArrayList();
       private List paramValues = new ArrayList();
  -    
  +
       public NewTag() {
       }
   
  @@ -47,19 +47,19 @@
       public void setVar(String var) {
           this.var = var;
       }
  -    
  +
       /** Sets the class name of the object to instantiate */
       public void setClassName(String className) {
           this.className = className;
       }
  -    
  +
       public void addArgument(Class type, Object value) {
           paramTypes.add(type);
           paramValues.add(value);
       }
  -    
  +
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           ArgTag parentArg = null;
           if ( var == null ) {
  @@ -96,13 +96,13 @@
           }
           catch (InstantiationException e) {
               throw new JellyTagException(e);
  -        } 
  +        }
           catch (NoSuchMethodException e) {
               throw new JellyTagException(e);
           }
           catch (IllegalAccessException e) {
               throw new JellyTagException(e);
  -        } 
  +        }
           catch (InvocationTargetException e) {
               throw new JellyTagException(e);
           }
  
  
  
  1.10      +10 -10    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ImportTag.java
  
  Index: ImportTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ImportTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ImportTag.java	24 Feb 2004 14:10:38 -0000	1.9
  +++ ImportTag.java	9 Sep 2004 12:27:53 -0000	1.10
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -36,17 +36,17 @@
   
   public class ImportTag extends TagSupport {
   
  -    /** 
  +    /**
        * the location of the script being imported, relative to the
        * current script
        */
       private String uri;
  -    
  +
       /**
        * Whether the imported script has access to the caller's variables
        */
       private boolean inherit;
  -    
  +
       /**
        * The file to be imported. Mutually exclusive with uri.
        * uri takes precedence.
  @@ -67,7 +67,7 @@
        * @param output the destination for output
        * @throws MissingAttributeException if a required attribute is missing
        * @throws JellyTagException on any other errors
  -     */ 
  +     */
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if (uri == null && file == null) {
               throw new MissingAttributeException( "uri" );
  @@ -89,7 +89,7 @@
       }
   
       // Properties
  -    //-------------------------------------------------------------------------                
  +    //-------------------------------------------------------------------------
   
       /**
        * @return whether property inheritence is enabled
  @@ -105,7 +105,7 @@
           this.inherit = inherit;
       }
   
  -    /** 
  +    /**
        * Sets the URI (relative URI or absolute URL) for the script to evaluate.
        */
       public void setUri(String uri) {
  
  
  
  1.4       +4 -4      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/BaseClassLoaderTag.java
  
  Index: BaseClassLoaderTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/BaseClassLoaderTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BaseClassLoaderTag.java	24 Feb 2004 14:10:38 -0000	1.3
  +++ BaseClassLoaderTag.java	9 Sep 2004 12:27:54 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * 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.
  
  
  
  1.14      +7 -7      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/IfTag.java
  
  Index: IfTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/IfTag.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- IfTag.java	24 Feb 2004 14:10:38 -0000	1.13
  +++ IfTag.java	9 Sep 2004 12:27:54 -0000	1.14
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -35,7 +35,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if (test != null) {
               if (test.evaluateAsBoolean(context)) {
  @@ -47,9 +47,9 @@
           }
   
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                
  +    //-------------------------------------------------------------------------
       /** Sets the Jelly expression to evaluate. If this returns true, the body of
        * the tag is evaluated
        *
  
  
  
  1.16      +12 -12    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ExprTag.java
  
  Index: ExprTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ExprTag.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ExprTag.java	24 Feb 2004 14:10:38 -0000	1.15
  +++ ExprTag.java	9 Sep 2004 12:27:54 -0000	1.16
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -36,15 +36,15 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           if (value != null) {
               String text = value.evaluateAsString(context);
               if (text != null) {
  -                
  +
                   try {
                       output.write(text);
  -                } 
  +                }
                   catch (SAXException e) {
                       throw new JellyTagException("could not write the XMLOutput",e);
                   }
  @@ -53,11 +53,11 @@
       }
   
       // Properties
  -    //-------------------------------------------------------------------------                
  -    
  -    /** 
  -     * Sets the Jexl expression to evaluate. 
  -     * 
  +    //-------------------------------------------------------------------------
  +
  +    /**
  +     * Sets the Jexl expression to evaluate.
  +     *
        * @required true
        */
       public void setValue(Expression value) {
  
  
  
  1.28      +25 -25    jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ForEachTag.java
  
  Index: ForEachTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ForEachTag.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ForEachTag.java	31 Aug 2004 08:59:46 -0000	1.27
  +++ ForEachTag.java	9 Sep 2004 12:27:54 -0000	1.28
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -27,11 +27,11 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -/** 
  +/**
     * Iterates over a collection, iterator or an array of objects.
     * Uses the same syntax as the <a href="http://java.sun.com/products/jsp/jstl/">JSTL</a>
     * <code>forEach</code> tag does.
  -  * 
  +  *
     * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
     * @version $Revision$
     */
  @@ -43,15 +43,15 @@
       /** Holds the variable name to export for the item being iterated over. */
       private Expression items;
   
  -    /** 
  +    /**
        * If specified then the current item iterated through will be defined
  -     * as the given variable name. 
  +     * as the given variable name.
        */
       private String var;
   
  -    /** 
  +    /**
        * If specified then the current index counter will be defined
  -     * as the given variable name. 
  +     * as the given variable name.
        */
       private String indexVar;
   
  @@ -72,25 +72,25 @@
   
       // Tag interface
   
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
   
           if (log.isDebugEnabled()) {
               log.debug("running with items: " + items);
           }
   
  -        try {            
  +        try {
               if (items != null) {
                   Iterator iter = items.evaluateAsIterator(context);
                   if (log.isDebugEnabled()) {
                       log.debug("Iterating through: " + iter);
                   }
  -    
  +
                   // ignore the first items of the iterator
                   for (index = 0; index < begin && iter.hasNext(); index++ ) {
                       iter.next();
                   }
  -                
  +
                   while (iter.hasNext() && index < end) {
                       Object value = iter.next();
                       if (var != null) {
  @@ -100,7 +100,7 @@
                           context.setVariable(indexVar, new Integer(index));
                       }
                       invokeBody(output);
  -                    
  +
                       // now we need to move to next index
                       index++;
                       for ( int i = 1; i < step; i++, index++ ) {
  @@ -120,9 +120,9 @@
                       if ( varName == null ) {
                           varName = indexVar;
                       }
  -                    
  +
                       for (index = begin; index <= end; index += step ) {
  -                    
  +
                           if (varName != null) {
                               Object value = new Integer(index);
                               context.setVariable(varName, value);
  @@ -140,12 +140,12 @@
       }
   
       // Properties
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
   
       /**
        * Sets the expression used to iterate over.
        * This expression could resolve to an Iterator, Collection, Map, Array,
  -     * Enumeration or comma separated String. 
  +     * Enumeration or comma separated String.
        */
       public void setItems(Expression items) {
           this.items = items;
  @@ -157,32 +157,32 @@
           this.var = var;
       }
   
  -    /** Sets the variable name to export the current index counter to 
  +    /** Sets the variable name to export the current index counter to
        */
       public void setIndexVar(String indexVar) {
           this.indexVar = indexVar;
       }
   
  -    /** Sets the starting index value 
  +    /** Sets the starting index value
        */
       public void setBegin(int begin) {
           this.begin = begin;
       }
   
  -    /** Sets the ending index value 
  +    /** Sets the ending index value
        */
       public void setEnd(int end) {
           this.end = end;
       }
   
  -    /** Sets the index increment step 
  +    /** Sets the index increment step
        */
       public void setStep(int step) {
           this.step = step;
       }
  -    
  +
       /**
  -     * Sets the variable name to export the current index to. 
  +     * Sets the variable name to export the current index to.
        * This does the same thing as #setIndexVar(), but is consistent
        * with the <a href="http://java.sun.com/products/jsp/jstl/">JSTL</a>
        * syntax.
  
  
  
  1.7       +7 -7      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/RemoveTag.java
  
  Index: RemoveTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/RemoveTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RemoveTag.java	24 Feb 2004 14:10:38 -0000	1.6
  +++ RemoveTag.java	9 Sep 2004 12:27:54 -0000	1.7
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -20,7 +20,7 @@
   import org.apache.commons.jelly.XMLOutput;
   import org.apache.commons.jelly.expression.Expression;
   
  -/** 
  +/**
    * A tag which removes the variable of the given name from the current variable scope.
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -34,7 +34,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException {
           if (var != null) {
               context.removeVariable( var.evaluateAsString(context) );
  @@ -45,8 +45,8 @@
       }
   
       // Properties
  -    //------------------------------------------------------------------------- 
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Sets the name of the variable which will be removed by this tag..
        */
  
  
  
  1.6       +5 -5      jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ScopeTag.java
  
  Index: ScopeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/ScopeTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ScopeTag.java	24 Feb 2004 14:10:38 -0000	1.5
  +++ ScopeTag.java	9 Sep 2004 12:27:54 -0000	1.6
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -20,7 +20,7 @@
   import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
   
  -/** 
  +/**
    * A tag which creates a new child variable scope for its body.
    * So any variables defined within its body will no longer be in scope
    * after this tag.
  @@ -31,7 +31,7 @@
   public class ScopeTag extends TagSupport {
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           JellyContext newContext = context.newJellyContext();
           getBody().run(newContext, output);
  
  
  

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


Mime
View raw message