[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jboss-aop/src/tools/xdoclet/modules/jboss/aop JBossCollectionTagsHandler.java
From:       andy godwin <andygodwin () users ! sourceforge ! net>
Date:       2003-06-30 13:37:50
[Download RAW message or body]

  User: andygodwin
  Date: 03/06/30 06:37:50

  Modified:    src/tools/xdoclet/modules/jboss/aop
                        JBossCollectionTagsHandler.java
  Log:
  Removed dependency on xdoclet.modules.util.CollectionMessages, as it's going
  to be removed from the XDoclet tree at some stage.
  
  Revision  Changes    Path
  1.2       +13 -22    \
jboss-aop/src/tools/xdoclet/modules/jboss/aop/JBossCollectionTagsHandler.java  
  Index: JBossCollectionTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-aop/src/tools/xdoclet/modules/jboss/aop/JBossCollectionTagsHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JBossCollectionTagsHandler.java	5 Jun 2003 21:53:23 -0000	1.1
  +++ JBossCollectionTagsHandler.java	30 Jun 2003 13:37:50 -0000	1.2
  @@ -5,7 +5,7 @@
    * See terms of license at gnu.org.
    */
   
  -// $Id: JBossCollectionTagsHandler.java,v 1.1 2003/06/05 21:53:23 andygodwin Exp $
  +// $Id: JBossCollectionTagsHandler.java,v 1.2 2003/06/30 13:37:50 andygodwin Exp $
   
   package xdoclet.modules.jboss.aop;
   
  @@ -29,9 +29,10 @@
    * intend to remove the Collection based functionality from the template
    * language.
    *
  + * @author Marcus Brito (pazu@animegaiden.com.br)
    * @author <a href="mailto:andy_godwin@hotmail.com">Andy Godwin</a>
    * @created May 28, 2003
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class JBossCollectionTagsHandler
          extends XDocletTagSupport
  @@ -70,15 +71,13 @@
         // Makes sure the name exists
         if (!collections.containsKey(name))
         {
  -         throw new XDocletException(Translator.getString(CollectionMessages.class,
  -            CollectionMessages.COLLECTION_NOT_DEFINED, new String[]{name}));
  +         throw new XDocletException("Collection '" + name + "' is not defined");
         }
   
         // Make sure the name is a map
         if (!(collections.get(name) instanceof Map))
         {
  -         throw new XDocletException(Translator.getString(CollectionMessages.class,
  -            CollectionMessages.COLLECTION_IS_NOT_MAP, new String[]{name}));
  +         throw new XDocletException("Collection '" + name + "' is not a map");
         }
   
         return (String)((Map)collections.get(name)).get(key);
  @@ -109,8 +108,7 @@
         // Prevent collection overwriting
         if (collections.containsKey(name))
         {
  -         throw new XDocletException(Translator.getString(CollectionMessages.class,
  -            CollectionMessages.COLLECTION_ALREADY_EXISTS, new String[]{name}));
  +         throw new XDocletException("Collection '" + name + "' already exists");
         }
   
         // Creates a new map or set, as requested
  @@ -155,8 +153,7 @@
         // Make sure the collection exists
         if (!collections.containsKey(name))
         {
  -         throw new XDocletException(Translator.getString(CollectionMessages.class,
  -            CollectionMessages.COLLECTION_NOT_DEFINED, new String[]{name}));
  +         throw new XDocletException("Collection '" + name + "' is not defined");
         }
   
         // Puts the value into the collection, as requested
  @@ -175,8 +172,7 @@
            // Throws an exception if key is specified
            if (key != null)
            {
  -            throw new \
                XDocletException(Translator.getString(CollectionMessages.class,
  -               CollectionMessages.COLLECTION_IS_NOT_MAP, new String[]{name}));
  +            throw new XDocletException("Collection '" + name + "' is not a map");
            }
   
            ((Set) collections.get(name)).add(value);
  @@ -209,8 +205,7 @@
         // Make sure name exists
         if (!collections.containsKey(name))
         {
  -         throw new XDocletException(Translator.getString(CollectionMessages.class,
  -            CollectionMessages.COLLECTION_NOT_DEFINED, new String[]{name}));
  +         throw new XDocletException("Collection '" + name + "' is not defined");
         }
   
         // Removes the key from the name, as requested
  @@ -298,8 +293,7 @@
         // Makes sure name exists
         if (!collections.containsKey(name))
         {
  -         throw new XDocletException(Translator.getString(CollectionMessages.class,
  -            CollectionMessages.COLLECTION_NOT_DEFINED, new String[]{name}));
  +         throw new XDocletException("Collection '" + name + "' is not defined");
         }
   
         collections.remove(name);
  @@ -334,8 +328,7 @@
         // Make sure name exists
         if (!collections.containsKey(name))
         {
  -         throw new XDocletException(Translator.getString(CollectionMessages.class,
  -            CollectionMessages.COLLECTION_NOT_DEFINED, new String[]{name}));
  +         throw new XDocletException("Collection '" + name + "' is not defined");
         }
   
         // Checks if the collection contains the key/value specified
  @@ -391,8 +384,7 @@
         // Make sure name exists
         if (o == null)
         {
  -         throw new XDocletException(Translator.getString(CollectionMessages.class,
  -            CollectionMessages.COLLECTION_NOT_DEFINED, new String[]{name}));
  +         throw new XDocletException("Collection '" + name + "' is not defined");
         }
           
         if (o instanceof Map)
  @@ -432,8 +424,7 @@
         // if we're iterating over a Set, the key is invalid, so barf
         if (curKey == null)
         {
  -         throw new XDocletException(Translator.getString(CollectionMessages.class,
  -            CollectionMessages.COLLECTION_IS_NOT_MAP, new String[]{curName}));
  +         throw new XDocletException("Collection '" + curName + "' is not a map");
         }
         return curKey;
      }
  
  
  


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic