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:14:12 UTC

cvs commit: jakarta-commons/jelly/jelly-tags/jmx/src/test/org/apache/commons/jelly/tags/jmx TestJelly.java Dummy.java DummyMBean.java

dion        2004/09/09 05:14:11

  Modified:    jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx
                        JMXTagLibrary.java ObjectNameConverter.java
               jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms
                        SubscribeTag.java ObjectMessageTag.java
                        PropertyTag.java ConsumerTag.java
                        ConnectionTag.java MapEntryTag.java
                        TextMessageTag.java SendTag.java MapMessageTag.java
                        MessageTag.java MessageOperationTag.java
                        ConnectionContext.java DestinationTag.java
                        JMSTagLibrary.java ReceiveTag.java
               jelly/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl
                        TestJSLSuite.java TestJSL.java
               jelly/jelly-tags/jsl/src/java/org/apache/commons/jelly/tags/jsl
                        JSLTagLibrary.java ApplyTemplatesTag.java
                        XPathPatternExpression.java
               jelly/jelly-tags/jmx/src/test/org/apache/commons/jelly/tags/jmx
                        TestJelly.java Dummy.java DummyMBean.java
  Log:
  Fix license file whitespace
  
  Revision  Changes    Path
  1.4       +10 -10    jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/JMXTagLibrary.java
  
  Index: JMXTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/JMXTagLibrary.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JMXTagLibrary.java	25 Feb 2004 01:31:56 -0000	1.3
  +++ JMXTagLibrary.java	9 Sep 2004 12:14:09 -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.
  @@ -22,21 +22,21 @@
   import org.apache.commons.jelly.tags.bean.BeanTagLibrary;
   
   
  -/** 
  +/**
    * A Tag library for creating an instantiating Java Beans and MBeans
  - * and registering them with JMX. Support for setting JMX attributes 
  - * and invoking JMX operations is also supported. 
  + * and registering them with JMX. Support for setting JMX attributes
  + * and invoking JMX operations is also supported.
    *
  - * @author 
  + * @author
    * @version $Revision$
    */
   public class JMXTagLibrary extends BeanTagLibrary {
   
       static {
  -        // register the various beanutils Converters from Strings to various JMX types 
  +        // register the various beanutils Converters from Strings to various JMX types
           ConvertUtils.register( new ObjectNameConverter(), ObjectName.class );
       }
  -        
  +
       public JMXTagLibrary() {
           registerTag("mbean", BeanTag.class);
           registerTag("operation", OperationTag.class);
  
  
  
  1.4       +5 -5      jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/ObjectNameConverter.java
  
  Index: ObjectNameConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/ObjectNameConverter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ObjectNameConverter.java	25 Feb 2004 01:31:56 -0000	1.3
  +++ ObjectNameConverter.java	9 Sep 2004 12:14:09 -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.
  @@ -21,7 +21,7 @@
   import org.apache.commons.beanutils.ConversionException;
   import org.apache.commons.beanutils.Converter;
   
  -/** 
  +/**
    * A Converter that turns Strings into JMX ObjectName objects
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  
  
  
  1.5       +25 -25    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/SubscribeTag.java
  
  Index: SubscribeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/SubscribeTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SubscribeTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ SubscribeTag.java	9 Sep 2004 12:14:09 -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;
   
  -/** 
  +/**
    * Performs a subscription to some JMS connection to a destination maybe with a selector.
  - * A JMS MessageListener can be specified, or a special child tag can explicitly set it on 
  + * A JMS MessageListener can be specified, or a special child tag can explicitly set it on
    * its parent (so a special tag could construct a MessageListener object and register it with this tag).
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -39,20 +39,20 @@
   
       /** the JMS Selector for the subscription */
       private String selector;
  -    
  +
       /** The JMS MessageListener used to create the subscription */
       private MessageListener messageListener;
  -    
  +
       public SubscribeTag() {
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
   
           // evaluate body as it may contain child tags to register a MessageListener
           invokeBody(output);
  -        
  +
           MessageListener listener = getMessageListener();
           if (listener == null) {
               throw new JellyTagException( "No messageListener attribute is specified so could not subscribe" );
  @@ -61,27 +61,27 @@
           // clear the listener for the next tag invocation, if caching is employed
           setMessageListener(null);
   
  -        
  +
           Destination destination = null;
           try {
               destination = getDestination();
  -        } 
  +        }
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
  -        
  +
           if ( destination == null ) {
               throw new JellyTagException( "No destination specified. Either specify a 'destination' attribute or use a nested <jms:destination> tag" );
           }
  -        
  +
           if ( log.isDebugEnabled() ) {
               log.debug( "About to consume to: " + destination + " with listener: " + listener );
           }
  -            
  +
           log.info( "About to consume to: " + destination + " with listener: " + listener );
  -        
  +
           try {
  -            if (selector == null ) {            
  +            if (selector == null ) {
                   getConnection().addListener( destination, listener );
               }
               else {
  @@ -92,17 +92,17 @@
               throw new JellyTagException(e);
           }
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------   
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Sets the optional JMS Message selector for the subscription
        */
       public void setSelector(String selector) {
           this.selector = selector;
  -    }                             
  -    
  +    }
  +
   
       /**
        * Returns the messageListener.
  @@ -112,7 +112,7 @@
           return messageListener;
       }
   
  -    
  +
       /**
        * Sets the JMS messageListener used ot consume JMS messages on the given destination
        */
  @@ -120,4 +120,4 @@
           this.messageListener = messageListener;
       }
   
  -}    
  +}
  
  
  
  1.5       +14 -14    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ObjectMessageTag.java
  
  Index: ObjectMessageTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ObjectMessageTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ObjectMessageTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ ObjectMessageTag.java	9 Sep 2004 12:14:09 -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.
  @@ -30,31 +30,31 @@
   public class ObjectMessageTag extends MessageTag {
   
       private Serializable object;
  -    
  +
       public ObjectMessageTag() {
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                                
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Sets the body of the message, a serializable java object.
  -     * If this value is not set or the value is null then the content 
  +     * If this value is not set or the value is null then the content
        * of the tag will be used instead.
        */
       public void setObject(Serializable object) {
           this.object = object;
       }
  -    
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------                            
  +    //-------------------------------------------------------------------------
       protected Message createMessage() throws JellyTagException {
           Serializable value = (object != null) ? object : getBodyText();
           try {
               return getConnection().createObjectMessage(value);
  -        } 
  +        }
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
  -    }    
  -}    
  +    }
  +}
  
  
  
  1.5       +13 -13    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/PropertyTag.java
  
  Index: PropertyTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/PropertyTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PropertyTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ PropertyTag.java	9 Sep 2004 12:14:09 -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.
  @@ -30,13 +30,13 @@
   
       /** Stores the name of the property */
       private String name;
  -    
  +
       /** Stores the value of the property */
       private Object value;
  -    
  -    
  +
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if ( name == null ) {
               throw new MissingAttributeException("name");
  @@ -45,7 +45,7 @@
           if ( tag == null ) {
               throw new JellyTagException("<jms:property> tag must be within a <jms:message> tag");
           }
  -        
  +
           if ( value != null ) {
               tag.addProperty(name, value);
           }
  @@ -54,16 +54,16 @@
           }
       }
   
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       /** Sets the name of the JMS property
         */
       public void setName(String name) {
           this.name = name;
       }
  -    
  -    /** Sets the value of the JMS property. 
  +
  +    /** Sets the value of the JMS property.
         * If no value is set then the body of the tag is used
         */
       public void setValue(Object value) {
  
  
  
  1.4       +7 -7      jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ConsumerTag.java
  
  Index: ConsumerTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ConsumerTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConsumerTag.java	25 Feb 2004 01:31:54 -0000	1.3
  +++ ConsumerTag.java	9 Sep 2004 12:14:09 -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.
  @@ -17,10 +17,10 @@
   
   import javax.jms.MessageListener;
   
  -/** 
  +/**
    * Represents an interface for a Tag which consumes JMS messages.
    * By default this is the &lt;subscribe&gt; tag but other tags could
  - * implement this interface to enabled things like Message pipelining, 
  + * implement this interface to enabled things like Message pipelining,
    * transactional message consumer tags, stopwatch wrappers etc.
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -33,4 +33,4 @@
        */
       public void setMessageListener(MessageListener messageListener);
   
  -}    
  +}
  
  
  
  1.5       +18 -18    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ConnectionTag.java
  
  Index: ConnectionTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ConnectionTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConnectionTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ ConnectionTag.java	9 Sep 2004 12:14:09 -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.
  @@ -32,7 +32,7 @@
   
       /** The variable name to create */
       private String var;
  -        
  +
       /** Stores the name of the map entry */
       private String name;
   
  @@ -40,42 +40,42 @@
       private Messenger connection;
   
       // ConnectionContext interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public Messenger getConnection() {
  -        return connection;        
  +        return connection;
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  -    public void doTag(XMLOutput output) throws JellyTagException {        
  -        
  -        try { 
  +    //-------------------------------------------------------------------------
  +    public void doTag(XMLOutput output) throws JellyTagException {
  +
  +        try {
               connection = MessengerManager.get( name );
           }
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
   
  -        if (connection == null) {        
  +        if (connection == null) {
               throw new JellyTagException( "Could not find a JMS connection called: " + name );
           }
   
           if ( var != null ) {
               context.setVariable( var, connection );
           }
  -        
  +
           invokeBody(output);
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       /** Sets the name of the Messenger (JMS connection pool) to use
         */
       public void setName(String name) {
           this.name = name;
       }
  -    
  +
       /** Sets the variable name to use for the exported Messenger (JMS connection pool)
         */
       public void setVar(String var) {
  
  
  
  1.5       +13 -13    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/MapEntryTag.java
  
  Index: MapEntryTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/MapEntryTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MapEntryTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ MapEntryTag.java	9 Sep 2004 12:14:09 -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.
  @@ -29,14 +29,14 @@
   
       /** Stores the name of the map entry */
       private String name;
  -    
  +
       /** Stores the value of the map entry */
       private Object value;
  -    
  -    
  +
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  -    public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {        
  +    //-------------------------------------------------------------------------
  +    public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
           if ( name == null ) {
               throw new MissingAttributeException("name");
           }
  @@ -44,7 +44,7 @@
           if ( tag == null ) {
               throw new JellyTagException("<jms:mapEntry> tag must be within a <jms:mapMessage> tag");
           }
  -        
  +
           if (value != null) {
               tag.addEntry( name, value );
           }
  @@ -52,15 +52,15 @@
               tag.addEntry( name, getBodyText() );
           }
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       /** Sets the name of the entry in the map message
         */
       public void setName(String name) {
           this.name = name;
       }
  -    
  +
       /** Sets the value of the entry in the map message.
         * If no value is set then the body of the tag is used
         */
  
  
  
  1.5       +13 -13    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/TextMessageTag.java
  
  Index: TextMessageTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/TextMessageTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TextMessageTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ TextMessageTag.java	9 Sep 2004 12:14:09 -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.
  @@ -28,13 +28,13 @@
   public class TextMessageTag extends MessageTag {
   
       private String text;
  -    
  +
       public TextMessageTag() {
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                                
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Sets the body of the message, a String. If this value is not set or
        * the value is null then the content of the tag will be used instead.
  @@ -42,10 +42,10 @@
       public void setText(String text) {
           this.text = text;
       }
  -    
  -    
  +
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------                            
  +    //-------------------------------------------------------------------------
       protected Message createMessage() throws JellyTagException {
           String value = (text != null) ? text : getBodyText();
           try {
  @@ -53,5 +53,5 @@
           } catch (JMSException e) {
               throw new JellyTagException(e);
           }
  -    }    
  -}    
  +    }
  +}
  
  
  
  1.5       +14 -14    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/SendTag.java
  
  Index: SendTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/SendTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SendTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ SendTag.java	9 Sep 2004 12:14:10 -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.
  @@ -31,21 +31,21 @@
   
       /** The JMS Message to be sent */
       private Message message;
  -    
  +
       public SendTag() {
       }
  -        
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           // evaluate body as it may contain a <destination> or message tag
           invokeBody(output);
  -        
  +
           Message message = getMessage();
           if ( message == null ) {
               throw new JellyTagException( "No message specified. Either specify a 'message' attribute or use a nested <jms:message> tag" );
           }
  -        
  +
           try {
               Destination destination = getDestination();
               if ( destination == null ) {
  @@ -57,17 +57,17 @@
               throw new JellyTagException(e);
           }
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                            
  +    //-------------------------------------------------------------------------
       public Message getMessage() {
           return message;
       }
   
       /**
  -     * Sets the JMS message to be sent 
  -     */    
  +     * Sets the JMS message to be sent
  +     */
       public void setMessage(Message message) {
           this.message = message;
       }
  -}    
  +}
  
  
  
  1.5       +14 -14    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/MapMessageTag.java
  
  Index: MapMessageTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/MapMessageTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MapMessageTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ MapMessageTag.java	9 Sep 2004 12:14:10 -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.
  @@ -38,15 +38,15 @@
           MapMessage message = (MapMessage) getMessage();
           try {
               message.setObject(name, value);
  -        } 
  +        }
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                                
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Sets the Map of entries to be used for this Map Message
        */
  @@ -56,23 +56,23 @@
               Map.Entry entry = (Map.Entry) iter.next();
               String name = entry.getKey().toString();
               Object value = entry.getValue();
  -            
  +
               try {
                   message.setObject(name, value);
  -            } 
  +            }
               catch (JMSException e) {
                   throw new JellyTagException(e);
               }
           }
       }
  -    
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------                            
  +    //-------------------------------------------------------------------------
       protected Message createMessage() throws JellyTagException {
           try {
               return getConnection().createMapMessage();
           } catch (JMSException e) {
               throw new JellyTagException(e);
           }
  -    }    
  -}    
  +    }
  +}
  
  
  
  1.5       +37 -37    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/MessageTag.java
  
  Index: MessageTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/MessageTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MessageTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ MessageTag.java	9 Sep 2004 12:14:10 -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.
  @@ -33,55 +33,55 @@
   public class MessageTag extends TagSupport {
   
       /** The name of the Message variable that is created */
  -    private String var;    
  -    
  +    private String var;
  +
       /** The JMS Message created */
       private Message message;
  -    
  +
       /** The Messenger used to access the JMS connection */
       private Messenger connection;
  -    
  +
       public MessageTag() {
       }
  -    
  +
       /** Adds a JMS property to the message */
       public void addProperty(String name, Object value) throws JellyTagException {
           Message message = getMessage();
  -        
  +
           try {
               message.setObjectProperty(name, value);
           } catch (JMSException e) {
               throw new JellyTagException(e);
           }
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  -    public void doTag(XMLOutput output) throws JellyTagException {                
  +    //-------------------------------------------------------------------------
  +    public void doTag(XMLOutput output) throws JellyTagException {
           if ( var == null ) {
               // expose message to parent message consumer
               SendTag tag = (SendTag) findAncestorWithClass( SendTag.class );
               if ( tag == null ) {
                   throw new JellyTagException("<jms:message> tags must either have the 'var' attribute specified or be used inside a <jms:send> tag");
               }
  -            
  +
               tag.setMessage( getMessage() );
           }
           else {
  -            
  +
               context.setVariable( var, getMessage() );
   
  -        }        
  +        }
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                            
  -    
  +    //-------------------------------------------------------------------------
  +
       /** Sets the name of the variable that the message will be exported to */
       public void setVar(String var) {
  -        this.var = var;        
  +        this.var = var;
       }
  -    
  +
       public Messenger getConnection() throws JellyTagException {
           if ( connection == null ) {
               return findConnection();
  @@ -95,74 +95,74 @@
       public void setConnection(Messenger connection) {
           this.connection = connection;
       }
  -    
  +
       public Message getMessage() throws JellyTagException {
           if ( message == null ) {
               message = createMessage();
           }
           return message;
       }
  -    
  +
   
       // JMS related properties
   
       /**
  -     * Sets the JMS Correlation ID to be used on the message 
  -     */    
  +     * Sets the JMS Correlation ID to be used on the message
  +     */
       public void setCorrelationID(String correlationID) throws JellyTagException {
           try {
               getMessage().setJMSCorrelationID(correlationID);
  -        } 
  +        }
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
       }
  -    
  +
       /**
        * Sets the reply-to destination to add to the message
        */
       public void setReplyTo(Destination destination) throws JellyTagException {
           try {
               getMessage().setJMSReplyTo(destination);
  -        } 
  +        }
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
       }
  -    
  +
       /**
        * Sets the type name of the message
        */
       public void setType(String type) throws JellyTagException {
           try {
               getMessage().setJMSType(type);
  -        } 
  +        }
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
       }
  -    
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------                            
  +    //-------------------------------------------------------------------------
       protected Messenger findConnection() throws JellyTagException {
           ConnectionContext messengerTag = (ConnectionContext) findAncestorWithClass( ConnectionContext.class );
           if ( messengerTag == null ) {
               throw new JellyTagException("This tag must be within a <jms:connection> tag or the 'connection' attribute should be specified");
           }
  -        
  +
           try {
               return messengerTag.getConnection();
  -        } 
  +        }
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
       }
  -    
  +
       protected Message createMessage() throws JellyTagException {
           try {
               return getConnection().createMessage();
           } catch (JMSException e) {
               throw new JellyTagException(e);
           }
  -    }    
  -}    
  +    }
  +}
  
  
  
  1.5       +15 -15    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/MessageOperationTag.java
  
  Index: MessageOperationTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/MessageOperationTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MessageOperationTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ MessageOperationTag.java	9 Sep 2004 12:14:10 -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.
  @@ -31,32 +31,32 @@
   
       /** The Messenger used to access the JMS connection */
       private Messenger connection;
  -    
  +
       /** The Destination */
       private Destination destination;
   
       /** The String subject used to find a destination */
       private String subject;
  -    
  +
       public MessageOperationTag() {
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                                
  +    //-------------------------------------------------------------------------
       public Messenger getConnection() throws JellyTagException, JMSException {
           if ( connection == null ) {
               return findConnection();
           }
           return connection;
       }
  -    
  +
       /**
        * Sets the Messenger (the JMS connection pool) that will be used to send the message
        */
       public void setConnection(Messenger connection) {
           this.connection = connection;
       }
  -    
  +
       public Destination getDestination() throws JellyTagException, JMSException {
           if (destination == null) {
               // if we have a subject defined, lets use it to find the destination
  @@ -66,7 +66,7 @@
           }
           return destination;
       }
  -    
  +
       /**
        * Sets the JMS Destination to be used by this tag
        */
  @@ -75,7 +75,7 @@
       }
   
       /**
  -     * Sets the subject as a String which is used to create the 
  +     * Sets the subject as a String which is used to create the
        * JMS Destination to be used by this tag
        */
       public void setSubject(String subject) {
  @@ -83,8 +83,8 @@
       }
   
       // Implementation methods
  -    //-------------------------------------------------------------------------                            
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Strategy Method allowing derived classes to change this behaviour
        */
  @@ -102,4 +102,4 @@
       protected Destination findDestination(String subject) throws JellyTagException, JMSException {
           return getConnection().getDestination(subject);
       }
  -}    
  +}
  
  
  
  1.5       +5 -5      jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ConnectionContext.java
  
  Index: ConnectionContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ConnectionContext.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConnectionContext.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ ConnectionContext.java	9 Sep 2004 12:14:10 -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.
  @@ -29,4 +29,4 @@
   public interface ConnectionContext {
   
       public Messenger getConnection() throws JellyTagException, JMSException;
  -}    
  +}
  
  
  
  1.5       +17 -17    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/DestinationTag.java
  
  Index: DestinationTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/DestinationTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DestinationTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ DestinationTag.java	9 Sep 2004 12:14:10 -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.
  @@ -32,31 +32,31 @@
   
       /** The variable name to create */
       private String var;
  -        
  +
       /** Stores the name of the map entry */
       private String name;
  -        
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  -    public void doTag(XMLOutput output) throws JellyTagException {        
  +    //-------------------------------------------------------------------------
  +    public void doTag(XMLOutput output) throws JellyTagException {
           ConnectionContext messengerTag = (ConnectionContext) findAncestorWithClass( ConnectionContext.class );
           if ( messengerTag == null ) {
               throw new JellyTagException("<jms:destination> tag must be within a <jms:connection> or <jms:send> or <jms:receive> tag");
           }
  -        
  +
           Destination destination = null;
           try {
               Messenger messenger = messengerTag.getConnection();
               if (messenger == null) {
  -                throw new JellyTagException("No JMS Connection could be found!" );            
  +                throw new JellyTagException("No JMS Connection could be found!" );
               }
               String subject = (name != null) ? name : getBodyText();
               destination = messenger.getDestination( subject );
  -        } 
  +        }
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
  -            
  +
           if ( var != null ) {
               context.setVariable( var, destination );
           }
  @@ -68,17 +68,17 @@
               tag.setDestination( destination );
           }
       }
  -    
  -    
  +
  +
       // Properties
  -    //-------------------------------------------------------------------------                    
  -    
  +    //-------------------------------------------------------------------------
  +
       /** Sets the name of the Destination
         */
       public void setName(String name) {
           this.name = name;
       }
  -    
  +
       /** Sets the variable name to use for the Destination
         */
       public void setVar(String var) {
  
  
  
  1.4       +4 -4      jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/JMSTagLibrary.java
  
  Index: JMSTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/JMSTagLibrary.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JMSTagLibrary.java	25 Feb 2004 01:31:54 -0000	1.3
  +++ JMSTagLibrary.java	9 Sep 2004 12:14:10 -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.5       +22 -22    jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ReceiveTag.java
  
  Index: ReceiveTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ReceiveTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ReceiveTag.java	25 Feb 2004 01:31:54 -0000	1.4
  +++ ReceiveTag.java	9 Sep 2004 12:14:10 -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.
  @@ -37,16 +37,16 @@
   
       private String var;
       private long timeout = -1L;
  -    
  +
       public ReceiveTag() {
       }
  -    
  +
       // Tag interface
  -    //-------------------------------------------------------------------------                    
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws JellyTagException {
           // evaluate body as it may contain a <destination> tag
           invokeBody(output);
  -        
  +
           Message message = null;
           try {
               Destination destination = getDestination();
  @@ -57,14 +57,14 @@
                   if ( log.isDebugEnabled() ) {
                       log.debug( "Receiving message on destination: " + destination + " with timeout: " + timeout );
                   }
  -                
  +
                   message = getConnection().receive( destination, timeout );
               }
               else if ( timeout == 0 ) {
                   if ( log.isDebugEnabled() ) {
                       log.debug( "Receiving message on destination: " + destination + " with No Wait" );
                   }
  -                
  +
                   message = getConnection().receiveNoWait( destination );
               }
               else {
  @@ -77,24 +77,24 @@
           catch (JMSException e) {
               throw new JellyTagException(e);
           }
  -            
  +
           onMessage( message );
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------                                
  +    //-------------------------------------------------------------------------
       public String getVar() {
           return var;
       }
  -    
  +
       /**
        * Sets the variable name to create for the received message, which will be null if no
        * message could be returned in the given time period.
        */
       public void setVar(String var) {
           this.var = var;
  -    }    
  -    
  +    }
  +
       public long getTimeout() {
           return timeout;
       }
  @@ -102,15 +102,15 @@
       /**
        * Sets the timeout period in milliseconds to wait for a message. A value
        * of -1 will wait forever for a message.
  -     */    
  +     */
       public void setTimeout(long timeout) {
           this.timeout = timeout;
       }
  -    
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------                            
  -    
  -    /** 
  +    //-------------------------------------------------------------------------
  +
  +    /**
        * A strategy method which processes the incoming message, allowing derived classes
        * to implement different processing methods
        */
  @@ -122,4 +122,4 @@
               context.removeVariable( var );
           }
       }
  -}    
  +}
  
  
  
  1.4       +6 -6      jakarta-commons/jelly/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/TestJSLSuite.java
  
  Index: TestJSLSuite.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/TestJSLSuite.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestJSLSuite.java	25 Feb 2004 01:31:59 -0000	1.3
  +++ TestJSLSuite.java	9 Sep 2004 12:14:11 -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:dion@apache.org">dIon Gillard</a>
  @@ -31,8 +31,8 @@
       public static void main( String[] args ) throws Exception {
           TestRunner.run( suite() );
       }
  -    
  +
       public static TestSuite suite() throws Exception {
  -        return createTestSuite(TestJSLSuite.class, "suite.jelly");        
  +        return createTestSuite(TestJSLSuite.class, "suite.jelly");
       }
   }
  
  
  
  1.6       +10 -10    jakarta-commons/jelly/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/TestJSL.java
  
  Index: TestJSL.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/TestJSL.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestJSL.java	25 Feb 2004 01:31:59 -0000	1.5
  +++ TestJSL.java	9 Sep 2004 12:14:11 -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.
  @@ -33,7 +33,7 @@
   import org.dom4j.Element;
   import org.dom4j.io.SAXContentHandler;
   
  -/** 
  +/**
    * Tests the JSL tags.
    * Note this test harness could be written in Jelly script
    * if we had the junit tag library!
  @@ -61,28 +61,28 @@
       public void testExample1() throws Exception {
           Document document = runScript( "src/test/org/apache/commons/jelly/jsl/example.jelly" );
           Element small = (Element) document.selectSingleNode("/html/body/small");
  -        
  +
           assertTrue( "<small> starts with 'James Elson'", small.getText().startsWith("James Elson") );
           assertEquals( "I am a title!", small.valueOf( "h2" ).trim() );
           assertEquals( "Twas a dark, rainy night...", small.valueOf( "small" ).trim() );
           assertEquals( "dfjsdfjsdf", small.valueOf( "p" ).trim() );
       }
  -    
  -        
  +
  +
       protected Document runScript(String fileName) throws Exception {
           InputStream in = new FileInputStream(fileName);
           XMLParser parser = new XMLParser();
           Script script = parser.parse(in);
           script = script.compile();
           JellyContext context = parser.getContext();
  -        
  +
           SAXContentHandler contentHandler = new SAXContentHandler();
           XMLOutput output = new XMLOutput( contentHandler );
  -        
  +
           contentHandler.startDocument();
           script.run(context, output);
           contentHandler.endDocument();
  -        
  +
           return contentHandler.getDocument();
       }
   }
  
  
  
  1.14      +15 -15    jakarta-commons/jelly/jelly-tags/jsl/src/java/org/apache/commons/jelly/tags/jsl/JSLTagLibrary.java
  
  Index: JSLTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jsl/src/java/org/apache/commons/jelly/tags/jsl/JSLTagLibrary.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- JSLTagLibrary.java	25 Feb 2004 01:32:00 -0000	1.13
  +++ JSLTagLibrary.java	9 Sep 2004 12:14:11 -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 @@
   
       /** The Log to which logging calls will be made. */
       private Log log = LogFactory.getLog(JSLTagLibrary.class);
  -    
  +
       public JSLTagLibrary() {
           registerTag("stylesheet", StylesheetTag.class);
           registerTag("style", StyleTag.class);
  @@ -52,34 +52,34 @@
           String attributeValue) throws JellyException {
   
           // #### may need to include some namespace URI information in the XPath instance?
  -        
  -        if (attributeName.equals("select")) {            
  +
  +        if (attributeName.equals("select")) {
               if ( log.isDebugEnabled() ) {
                   log.debug( "Parsing XPath expression: " + attributeValue );
               }
  -            
  +
               Expression xpathExpr = createXPathTextExpression( attributeValue );
  -            
  +
               return new XPathExpression(attributeValue, xpathExpr, tagScript);
           }
  -        
  +
           if (attributeName.equals("match")) {
               if ( log.isDebugEnabled() ) {
                   log.debug( "Parsing XPath pattern: " + attributeValue );
               }
  -            
  +
               try {
                   Pattern pattern = DocumentHelper.createPattern( attributeValue );
                   return new XPathPatternExpression(attributeValue, pattern);
               }
               catch (Exception e) {
  -                throw new JellyException( "Could not parse XPath expression: \"" + attributeValue + "\" reason: " + e, e );            
  -            }            
  +                throw new JellyException( "Could not parse XPath expression: \"" + attributeValue + "\" reason: " + e, e );
  +            }
           }
  -        
  +
           // will use the default expression instead
           return super.createExpression(factory, tagScript, attributeName, attributeValue);
       }
  -    
  -    
  +
  +
   }
  
  
  
  1.10      +18 -18    jakarta-commons/jelly/jelly-tags/jsl/src/java/org/apache/commons/jelly/tags/jsl/ApplyTemplatesTag.java
  
  Index: ApplyTemplatesTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jsl/src/java/org/apache/commons/jelly/tags/jsl/ApplyTemplatesTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ApplyTemplatesTag.java	25 Feb 2004 01:32:00 -0000	1.9
  +++ ApplyTemplatesTag.java	9 Sep 2004 12:14:11 -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.
  @@ -23,7 +23,7 @@
   import org.dom4j.rule.Stylesheet;
   import org.jaxen.XPath;
   
  -/** 
  +/**
    * Implements the apply templates function in the stylesheet, similar to the XSLT equivalent.
    * a JSP include.
    *
  @@ -34,32 +34,32 @@
   
       /** The Log to which logging calls will be made. */
       private Log log = LogFactory.getLog(ApplyTemplatesTag.class);
  -    
  +
       /** Holds value of property mode. */
  -    private String mode;    
  +    private String mode;
   
       /** Holds the XPath object */
       private XPath select;
  -    
  +
   
       public ApplyTemplatesTag() {
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       /** By default just evaluate the body */
       public void doTag(XMLOutput output) throws JellyTagException {
           StylesheetTag tag = (StylesheetTag) findAncestorWithClass( StylesheetTag.class );
           if (tag == null) {
  -            throw new JellyTagException( 
  +            throw new JellyTagException(
                   "<applyTemplates> tag must be inside a <stylesheet> tag"
               );
           }
           Stylesheet stylesheet = tag.getStylesheet();
  -        
  +
           XMLOutput oldOutput = tag.getStylesheetOutput();
           tag.setStylesheetOutput(output);
  -        
  +
           Object source = tag.getXPathSource();
           // for some reason, these DOM4J methods only throw Exception
           try {
  @@ -69,28 +69,28 @@
               else {
                   stylesheet.applyTemplates( source );
               }
  -        } 
  +        }
           catch (Exception e) {
               throw new JellyTagException(e);
           }
  -        
  +
           tag.setStylesheetOutput(oldOutput);
  -        
  +
           // #### should support MODE!!!
  -        
  +
       }
   
       // Properties
  -    //-------------------------------------------------------------------------                
  +    //-------------------------------------------------------------------------
   
       public void setSelect( XPath select ) {
           this.select = select;
       }
  -    
  +
       /** Sets the mode.
        * @param mode New value of property mode.
        */
       public void setMode(String mode) {
           this.mode = mode;
  -    }    
  +    }
   }
  
  
  
  1.7       +14 -14    jakarta-commons/jelly/jelly-tags/jsl/src/java/org/apache/commons/jelly/tags/jsl/XPathPatternExpression.java
  
  Index: XPathPatternExpression.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jsl/src/java/org/apache/commons/jelly/tags/jsl/XPathPatternExpression.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XPathPatternExpression.java	25 Feb 2004 01:32:00 -0000	1.6
  +++ XPathPatternExpression.java	9 Sep 2004 12:14:11 -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.
  @@ -27,38 +27,38 @@
     */
   public class XPathPatternExpression extends ExpressionSupport implements VariableContext {
   
  -    private String text;    
  +    private String text;
       private Pattern pattern;
       private JellyContext context;
  -    
  +
       public XPathPatternExpression(String text, Pattern pattern) {
           this.text = text;
           this.pattern = pattern;
       }
  -    
  +
       // Expression interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public String getExpressionText() {
           return text;
       }
  -    
  +
       public Object evaluate(JellyContext context) {
           this.context = context;
           //pattern.setVariableContext(this);
           return pattern;
       }
  -    
  +
       // VariableContext interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public Object getVariableValue(
           String namespaceURI,
           String prefix,
           String localName) {
  -            
  +
           Object value = context.getVariable(localName);
  -        
  -        //log.info( "Looking up XPath variable of name: " + localName + " value is: " + value );            
  -        
  +
  +        //log.info( "Looking up XPath variable of name: " + localName + " value is: " + value );
  +
           return value;
       }
   }
  
  
  
  1.4       +7 -7      jakarta-commons/jelly/jelly-tags/jmx/src/test/org/apache/commons/jelly/tags/jmx/TestJelly.java
  
  Index: TestJelly.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jmx/src/test/org/apache/commons/jelly/tags/jmx/TestJelly.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestJelly.java	25 Feb 2004 01:31:52 -0000	1.3
  +++ TestJelly.java	9 Sep 2004 12:14:11 -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       +10 -10    jakarta-commons/jelly/jelly-tags/jmx/src/test/org/apache/commons/jelly/tags/jmx/Dummy.java
  
  Index: Dummy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jmx/src/test/org/apache/commons/jelly/tags/jmx/Dummy.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Dummy.java	25 Feb 2004 01:31:52 -0000	1.3
  +++ Dummy.java	9 Sep 2004 12:14:11 -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.
  @@ -18,7 +18,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -/** 
  +/**
    * A dummy MBean used for the demo
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -28,23 +28,23 @@
   
       /** The Log to which logging calls will be made. */
       private static final Log log = LogFactory.getLog(Dummy.class);
  -    
  +
       private String name = "James";
       private int count;
  -    
  +
       public void doSomething() {
           ++count;
           log.info("Do something! on: " + this);
       }
  -    
  +
       public String toString() {
           return super.toString() + "[name=" + name + "]";
       }
   
  -    
  +
       // Properties
       //-------------------------------------------------------------------------
  -    
  +
       /**
        * @return int
        */
  
  
  
  1.4       +6 -6      jakarta-commons/jelly/jelly-tags/jmx/src/test/org/apache/commons/jelly/tags/jmx/DummyMBean.java
  
  Index: DummyMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/jmx/src/test/org/apache/commons/jelly/tags/jmx/DummyMBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DummyMBean.java	25 Feb 2004 01:31:52 -0000	1.3
  +++ DummyMBean.java	9 Sep 2004 12:14:11 -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.
  @@ -16,7 +16,7 @@
   package org.apache.commons.jelly.tags.jmx;
   
   /**
  - * A dummy MBean interface 
  + * A dummy MBean interface
    * @author James Strachan
    */
   public interface DummyMBean {
  @@ -24,7 +24,7 @@
       String getName();
       void setCount(int count);
       void setName(String name);
  -    
  +
       void doSomething();
  -    
  +
   }
  
  
  

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