You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2004/09/09 14:07:24 UTC

cvs commit: jakarta-commons/jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/mock TestJUnit.java

dion        2004/09/09 05:07:24

  Modified:    jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define
                        SuperTag.java InvokeTag.java JellyBeanTag.java
                        DefineTagLibrary.java AttributeTag.java
                        ExtendTag.java InvokeBodyTag.java ScriptTag.java
                        DefineTagSupport.java TaglibTag.java
                        ClassLoaderTag.java TagTag.java
               jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/define
                        TestJelly.java MyRunnable.java DynamicTag.java
               jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/mock
                        TestJUnit.java
  Log:
  Fix license file whitespace
  
  Revision  Changes    Path
  1.5       +8 -8      jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/SuperTag.java
  
  Index: SuperTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/SuperTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SuperTag.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ SuperTag.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 1999-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;
   
  -/** 
  +/**
    * <super> tag is used to invoke a parent tag implementation, when
    * a tag extends an existing tag
    *
  @@ -28,16 +28,16 @@
    * @see ExtendTag
    */
   public class SuperTag extends TagSupport {
  -    
  +
       public SuperTag() {
       }
  -    
  +
       // Tag interface
       //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           ExtendTag tag = (ExtendTag) findAncestorWithClass(ExtendTag.class);
           if (tag == null) {
  -            throw new JellyTagException( 
  +            throw new JellyTagException(
                   "<define:super> must be inside a <define:extend>");
           }
   
  
  
  
  1.5       +9 -9      jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/InvokeTag.java
  
  Index: InvokeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/InvokeTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InvokeTag.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ InvokeTag.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -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.
  @@ -23,7 +23,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -/** 
  +/**
    * The &lt;invoke&gt; tag will invoke a given Script instance.
    * It can be used with the &lt;script&gt; tag which defines scripts
    * as variables that can later be invoked by this &lt;invoke&gt; tag.
  @@ -37,11 +37,11 @@
       private static final Log log = LogFactory.getLog(InvokeTag.class);
   
       private Script script;
  -    
  -    
  +
  +
       public InvokeTag() {
       }
  -    
  +
       /**
        * Sets the Script to be invoked by this tag, which typically has been previously
        * defined by the use of the &lt;script&gt; tag.
  @@ -51,7 +51,7 @@
       }
   
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if ( script == null ) {
               throw new MissingAttributeException("script");
  
  
  
  1.5       +18 -18    jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/JellyBeanTag.java
  
  Index: JellyBeanTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/JellyBeanTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JellyBeanTag.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ JellyBeanTag.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -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,11 +24,11 @@
   import org.apache.commons.logging.LogFactory;
   
   
  -/** 
  +/**
    * Binds a Java bean to the given named Jelly tag so that the attributes of
    * the tag set the bean properties. After the body of this tag is invoked
    * then the beans invoke() method will be called, if the bean has one.
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  @@ -39,13 +39,13 @@
   
       /** Empty parameter types for Method lookup */
       private static final Class[] emptyParamTypes = {};
  -    
  +
       /** the name of the method to invoke on the bean */
       private String method;
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * @return the method name to use, which defaults to 'run' for Runnable
        * objects
  @@ -56,9 +56,9 @@
           }
           return method;
       }
  -    
  -    /** 
  -     * Sets the name of the method to invoke on the bean. 
  +
  +    /**
  +     * Sets the name of the method to invoke on the bean.
        * This defaults to "run" so that Runnable objects can be
        * invoked, but this property can be set to whatever is required,
        * such as "execute" or "invoke"
  @@ -66,18 +66,18 @@
       public void setMethod(String method) {
           this.method = method;
       }
  -    
  -    
  +
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       protected Method getInvokeMethod( Class theClass ) {
           Method invokeMethod =
               MethodUtils.getAccessibleMethod(
                   theClass,
                   getMethod(),
                   emptyParamTypes);
  -                
  +
           if ( invokeMethod == null ) {
           }
           return invokeMethod;
  
  
  
  1.5       +7 -7      jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/DefineTagLibrary.java
  
  Index: DefineTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/DefineTagLibrary.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefineTagLibrary.java	7 Sep 2004 06:30:52 -0000	1.4
  +++ DefineTagLibrary.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -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.
  @@ -18,13 +18,13 @@
   import org.apache.commons.jelly.TagLibrary;
   
   
  -/** 
  +/**
    * This is a tag library that allows you to define new tag libraries at run time.
    * Thus tag libraries and tags can be easily implemented in Jelly rather than
    * in Java code.
  - * 
  + *
    * Please see the individual tag classes for more information, particularly
  - * {@link TaglibTag Taglib tag} and {@link TagTag Tag tag}. 
  + * {@link TaglibTag Taglib tag} and {@link TagTag Tag tag}.
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
  
  
  
  1.5       +16 -16    jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/AttributeTag.java
  
  Index: AttributeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/AttributeTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AttributeTag.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ AttributeTag.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -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,9 +24,9 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -/** 
  +/**
    * This tag is bound onto a Java Bean class. When the tag is invoked a bean will be created
  - * using the tags attributes. 
  + * using the tags attributes.
    * The bean may also have an invoke method called invoke(), run(), execute() or some such method
    * which will be invoked after the bean has been configured.</p>
    *
  @@ -40,8 +40,8 @@
       private static final Log log = LogFactory.getLog(AttributeTag.class);
   
       /** the attribute definition */
  -    private Attribute attribute;    
  -        
  +    private Attribute attribute;
  +
       public AttributeTag() {
           attribute = new Attribute();
       }
  @@ -51,33 +51,33 @@
       }
   
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           BeanTag tag = (BeanTag) findAncestorWithClass( BeanTag.class );
           if ( tag == null ) {
               throw new JellyTagException( "This tag should be nested inside a <define:bean> or <define:jellybean> tag" );
           }
   
  -        tag.addAttribute( attribute );        
  +        tag.addAttribute( attribute );
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
  -     * Sets the name of the attribute 
  +     * Sets the name of the attribute
        */
       public void setName(String name) {
           attribute.setName(name);
       }
  -    
  +
       /**
        * Sets whether this attribute is mandatory or not
        */
       public void setRequired(boolean required) {
           attribute.setRequired(required);
       }
  -    
  +
       /**
        * Sets the default value of this attribute
        */
  
  
  
  1.5       +20 -20    jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/ExtendTag.java
  
  Index: ExtendTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/ExtendTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ExtendTag.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ ExtendTag.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 1999-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,8 +20,8 @@
   import org.apache.commons.jelly.XMLOutput;
   import org.apache.commons.jelly.impl.DynamicTagLibrary;
   
  -/** 
  - * &lt;extend&gt; is used to extend a dynamic tag defined in an inherited 
  +/**
  + * &lt;extend&gt; is used to extend a dynamic tag defined in an inherited
    * dynamic tag library
    * <p/>
    *
  @@ -30,16 +30,16 @@
    * @see SuperTag
    */
   public class ExtendTag extends DefineTagSupport {
  -    
  +
       private String name;
   
       private Script superScript;
  -    
  +
       public ExtendTag() {
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           DynamicTagLibrary library = getTagLibrary();
           DynamicTagLibrary owner = library.find(getName());
  @@ -50,35 +50,35 @@
           if (owner == library) {
               // disallow extension of tags defined within the same tag
               // library
  -            throw new JellyTagException("Cannot extend " + getName() + 
  +            throw new JellyTagException("Cannot extend " + getName() +
                                        ": dynamic tag defined locally");
           }
           superScript = owner.getDynamicTag(name);
           if (superScript == null) {
               // tag doesn't define a script - disallow this for the moment.
  -            throw new JellyTagException("Cannot extend " + getName() + 
  +            throw new JellyTagException("Cannot extend " + getName() +
                                        ": tag is not a dynamic tag");
           }
   
           owner.registerDynamicTag(getName() , getBody());
  -    }    
  +    }
   
       // Properties
       //-------------------------------------------------------------------------
  -    
  -    /** 
  -     * @return the name of the tag to create 
  +
  +    /**
  +     * @return the name of the tag to create
        */
       public String getName() {
           return name;
       }
  -    
  -    /** 
  -     * Sets the name of the tag to create 
  +
  +    /**
  +     * Sets the name of the tag to create
        */
       public void setName(String name) {
           this.name = name;
  -    }    
  +    }
   
       /**
        * Returns the parent implementation of this tag
  
  
  
  1.5       +10 -10    jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/InvokeBodyTag.java
  
  Index: InvokeBodyTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/InvokeBodyTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InvokeBodyTag.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ InvokeBodyTag.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -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,11 +24,11 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -/** 
  - * &lt;invokeBody&gt; tag is used inside a &lt;tag&gt; tag 
  - * (i.e. the definition of a dynamic tag) to invoke the tags body when 
  +/**
  + * &lt;invokeBody&gt; tag is used inside a &lt;tag&gt; tag
  + * (i.e. the definition of a dynamic tag) to invoke the tags body when
    * the tag is invoked.
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  @@ -41,7 +41,7 @@
       }
   
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           // Try find find the body from the reserved 'org.apache.commons.jelly.body' variable
           Script script = (Script) context.getVariable("org.apache.commons.jelly.body");
  @@ -49,7 +49,7 @@
               script.run(context, output);
           }
           else {
  -            // note this mechanism does not work properly for arbitrarily 
  +            // note this mechanism does not work properly for arbitrarily
               // nested dynamic tags. A better way is required.
               Tag tag = findAncestorWithClass(this, DynamicTag.class);
               if (tag == null) {
  
  
  
  1.5       +15 -15    jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/ScriptTag.java
  
  Index: ScriptTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/ScriptTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ScriptTag.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ ScriptTag.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -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;
   
  -/** 
  +/**
    * &lt;script&gt; tag is used to assign a Script object
    * to a variable. The script can then be called whenever the user wishes
    * maybe from inside an expression or more typically via the &lt;invoke&gt; tag.</p>
  @@ -28,31 +28,31 @@
    * @version $Revision$
    */
   public class ScriptTag extends TagSupport {
  -    
  +
       private String var;
  -    
  +
       public ScriptTag() {
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           if ( var == null ) {
               throw new JellyTagException( "<define:script> must have a var attribute" );
           }
           context.setVariable( var, getBody() );
  -    }    
  -    
  +    }
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       /** @return the variable name of the script to create */
       public String getVar() {
           return var;
       }
  -    
  +
       /** Sets the variable name of the tag to create */
       public void setVar(String var) {
           this.var = var;
  -    }    
  +    }
   }
  
  
  
  1.5       +10 -10    jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/DefineTagSupport.java
  
  Index: DefineTagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/DefineTagSupport.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefineTagSupport.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ DefineTagSupport.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -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,28 +20,28 @@
   import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.impl.DynamicTagLibrary;
   
  -/** 
  +/**
    * An abstract base class useful for implementation inheritence.
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
   public abstract class DefineTagSupport extends TagSupport {
   
       // Implementation methods
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * @return the current dynamic tag library instance or throws a JellyException
        * if one is not available
        */
       protected DynamicTagLibrary getTagLibrary() throws JellyTagException {
  -        TaglibTag tag 
  +        TaglibTag tag
               = (TaglibTag) findAncestorWithClass(TaglibTag.class);
           if ( tag == null ) {
               throw new JellyTagException( "<define:tag> must be inside <define:taglib>" );
           }
           return tag.getTagLibrary();
       }
  -    
  +
   }
  
  
  
  1.6       +21 -21    jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/TaglibTag.java
  
  Index: TaglibTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/TaglibTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TaglibTag.java	7 Sep 2004 06:30:52 -0000	1.5
  +++ TaglibTag.java	9 Sep 2004 12:07:23 -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,13 +20,13 @@
   import org.apache.commons.jelly.XMLOutput;
   import org.apache.commons.jelly.impl.DynamicTagLibrary;
   
  -/** 
  +/**
    * The &lt;taglib&gt; tag is used to define a new tag library
    * using a Jelly script. The tag library is identified by its
    * {@link #getURI() URI}.
  - * 
  + *
    * The tags for a taglib are declared using the {@link TagTag}.
  - * 
  + *
    * You can 'inherit' tags from a previously defined taglib, as well,
    * allowing runtime extension of tag libraries
    *
  @@ -34,23 +34,23 @@
    * @version $Revision$
    */
   public class TaglibTag extends TagSupport {
  -    
  +
       /** The namespace URI */
       private String uri;
       /** The new tags being added */
       private DynamicTagLibrary tagLibrary;
       /** Whether or not inheritence is enabled */
       private boolean inherit = true;
  -    
  +
       public TaglibTag() {
       }
  -    
  +
       public TaglibTag(String uri) {
           this.uri = uri;
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           String uri = getUri();
           tagLibrary = new DynamicTagLibrary( uri );
  @@ -60,29 +60,29 @@
               tagLibrary.setParent( context.getTagLibrary( uri ) );
           }
           context.registerTagLibrary( uri, tagLibrary );
  -        
  +
           invokeBody(output);
   
           tagLibrary = null;
  -    }    
  -    
  +    }
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public String getUri() {
           return uri;
       }
   
       /**
        * Sets the namespace URI to register this new dynamic tag library with
  -     */    
  +     */
       public void setUri(String uri) {
           this.uri = uri;
       }
  -    
  +
       public DynamicTagLibrary getTagLibrary() {
           return tagLibrary;
       }
  -    
  +
       /**
        * Returns the inherit.
        * @return boolean
  @@ -92,10 +92,10 @@
       }
   
       /**
  -     * Sets whether this dynamic tag should inherit from the current existing tag library 
  +     * Sets whether this dynamic tag should inherit from the current existing tag library
        * of the same URI. This feature is enabled by default so that tags can easily be
        * some tags can be overridden in an existing library, such as when making Mock Tags.
  -     * 
  +     *
        * You can disable this option if you want to disable any tags in the base library,
        * turning them into just normal static XML.
        *
  
  
  
  1.5       +23 -23    jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/ClassLoaderTag.java
  
  Index: ClassLoaderTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/ClassLoaderTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClassLoaderTag.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ ClassLoaderTag.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -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,10 +27,10 @@
   import org.apache.commons.logging.LogFactory;
   
   
  -/** 
  +/**
    * Creates a new <code>URLClassLoader</code> to dynamically
    * load tags froms.
  - * 
  + *
    * @author <a href="mailto:stephenh@chase3000.com">Stephen Haberman</a>
    * @version $Revision$
    */
  @@ -38,24 +38,24 @@
   
       /** The Log to which logging calls will be made. */
       private static final Log log = LogFactory.getLog(ClassLoaderTag.class);
  -    
  +
       /** The name to export the classloader to. */
       private String var;
  -    
  +
       /** The URL to load the classes from. */
       private String url;
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * @return the variable to store the class loader in
        */
       public String getVar() {
           return this.var;
       }
  -    
  -    /** 
  +
  +    /**
        * @param var the variable to store the class loader in
        */
       public void setVar(String var) {
  @@ -68,7 +68,7 @@
       public String getUrl() {
           return this.url;
       }
  -    
  +
       /**
        * @param url the url to load the classes from
        */
  @@ -77,8 +77,8 @@
       }
   
       // Implementation methods
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if ( getVar() == null ) {
               throw new MissingAttributeException( "var" );
  @@ -86,24 +86,24 @@
           if ( getUrl() == null ) {
               throw new MissingAttributeException( "url" );
           }
  -                
  +
           ClassLoader parent = Thread.currentThread().getContextClassLoader();
           if (parent == null) {
               parent = getClass().getClassLoader();
           }
  -        
  +
           URLClassLoader newClassLoader = null;
  -        
  +
           try {
  -            newClassLoader = 
  +            newClassLoader =
                 new URLClassLoader( new URL[] { new URL(getUrl()) }, parent );
           } catch (MalformedURLException e) {
               throw new JellyTagException(e);
           }
  -        
  +
           log.debug("Storing the new classloader in " + getVar());
  -        
  +
           context.setVariable(getVar(), newClassLoader);
       }
  -    
  +
   }
  
  
  
  1.5       +16 -16    jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/TagTag.java
  
  Index: TagTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/TagTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TagTag.java	25 Feb 2004 01:31:52 -0000	1.4
  +++ TagTag.java	9 Sep 2004 12:07:23 -0000	1.5
  @@ -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.
  @@ -15,10 +15,10 @@
    */
   package org.apache.commons.jelly.tags.define;
   
  -import org.apache.commons.jelly.JellyTagException; 
  +import org.apache.commons.jelly.JellyTagException;
   import org.apache.commons.jelly.XMLOutput;
   
  -/** 
  +/**
    * &lt;tag&gt; is used to define a new tag
    * using a Jelly script to implement the behaviour of the tag.
    * Parameters can be passed into the new tag using normal XML attribute
  @@ -29,28 +29,28 @@
    * @version $Revision$
    */
   public class TagTag extends DefineTagSupport {
  -    
  +
       private String name;
  -    
  +
       public TagTag() {
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           getTagLibrary().registerDynamicTag( getName(), getBody() );
  -    }    
  -    
  +    }
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       /** @return the name of the tag to create */
       public String getName() {
           return name;
       }
  -    
  +
       /** Sets the name of the tag to create */
       public void setName(String name) {
           this.name = name;
  -    }    
  +    }
   }
  
  
  
  1.4       +7 -7      jakarta-commons/jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/define/TestJelly.java
  
  Index: TestJelly.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/define/TestJelly.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestJelly.java	25 Feb 2004 01:31:59 -0000	1.3
  +++ TestJelly.java	9 Sep 2004 12:07:24 -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.
  @@ -20,7 +20,7 @@
   
   import org.apache.commons.jelly.tags.junit.JellyTestSuite;
   
  -/** 
  +/**
    * A helper class to run jelly test cases as part of Ant's JUnit tests
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -31,8 +31,8 @@
       public static void main( String[] args ) throws Exception {
           TestRunner.run( suite() );
       }
  -    
  +
       public static TestSuite suite() throws Exception {
  -        return createTestSuite(TestJelly.class, "suite.jelly");        
  +        return createTestSuite(TestJelly.class, "suite.jelly");
       }
   }
  
  
  
  1.4       +15 -15    jakarta-commons/jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/define/MyRunnable.java
  
  Index: MyRunnable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/define/MyRunnable.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MyRunnable.java	25 Feb 2004 01:31:59 -0000	1.3
  +++ MyRunnable.java	9 Sep 2004 12:07:24 -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.
  @@ -23,7 +23,7 @@
   
   //import org.apache.tools.ant.types.FileSet;
   
  -/** 
  +/**
    * An example Runnable bean that is framework neutral and just performs
    * some useful function.
    *
  @@ -37,23 +37,23 @@
   
       private int x;
       private String y;
  -    private List fileSets = new ArrayList();    
  -        
  +    private List fileSets = new ArrayList();
  +
       public MyRunnable() {
       }
  -    
  -    
  +
  +
       // Adder methods
       //-------------------------------------------------------------------------
       /*
  -    
  +
       Commented out method to remove test-only dependency on ant
  -    
  +
       public void addFileset(FileSet fileSet) {
           fileSets.add(fileSet);
       }
       */
  -    
  +
       // Runnable interface
       //-------------------------------------------------------------------------
       public void run() {
  @@ -67,15 +67,15 @@
       public int getX() {
           return x;
       }
  -    
  +
       public void setX(int x) {
           this.x = x;
       }
  -    
  +
       public String getY() {
           return y;
       }
  -    
  +
       public void setY(String y) {
           this.y = y;
       }
  
  
  
  1.5       +4 -4      jakarta-commons/jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/define/DynamicTag.java
  
  Index: DynamicTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/define/DynamicTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DynamicTag.java	25 Feb 2004 01:31:59 -0000	1.4
  +++ DynamicTag.java	9 Sep 2004 12:07:24 -0000	1.5
  @@ -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.4       +7 -7      jakarta-commons/jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/mock/TestJUnit.java
  
  Index: TestJUnit.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/define/src/test/org/apache/commons/jelly/tags/mock/TestJUnit.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestJUnit.java	25 Feb 2004 01:32:00 -0000	1.3
  +++ TestJUnit.java	9 Sep 2004 12:07:24 -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.
  @@ -20,7 +20,7 @@
   
   import org.apache.commons.jelly.tags.junit.JellyTestSuite;
   
  -/** 
  +/**
    * A helper class to run jelly test cases as part of Ant's JUnit tests
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -31,8 +31,8 @@
       public static void main( String[] args ) throws Exception {
           TestRunner.run( suite() );
       }
  -    
  +
       public static TestSuite suite() throws Exception {
  -        return createTestSuite(TestJUnit.class, "suite.jelly");        
  +        return createTestSuite(TestJUnit.class, "suite.jelly");
       }
   }
  
  
  

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