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

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jboss-portal/common/src/main/org/jboss/portal/common/util  ...
From:       Julien Viet <julien () jboss ! com>
Date:       2005-08-31 23:50:40
Message-ID: E1EAcLo-0000OY-J6 () committer01 ! frg ! pub ! inap ! atl ! jboss ! com
[Download RAW message or body]

  User: julien  
  Date: 05/08/31 19:50:40

  Added:       common/src/main/org/jboss/portal/common/util 
                        MapResourceBundle.java
  Log:
  port JBPORTAL 378 to head :  BBCode list ending element does not send the end event
  
  Revision  Changes    Path
  1.2       +46 -0     jboss-portal/common/src/main/org/jboss/portal/common/util/MapResourceBundle.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MapResourceBundle.java
  ===================================================================
  RCS file: MapResourceBundle.java
  diff -N MapResourceBundle.java
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ MapResourceBundle.java	31 Aug 2005 23:50:40 -0000	1.2
  @@ -0,0 +1,46 @@
  +/*****************************************
  + *                                       *
  + *  JBoss Portal: The OpenSource Portal  *
  + *                                       *
  + *   Distributable under LGPL license.   *
  + *   See terms of license at gnu.org.    *
  + *                                       *
  + *****************************************/
  +package org.jboss.portal.common.util;
  +
  +import java.util.ResourceBundle;
  +import java.util.Map;
  +import java.util.HashMap;
  +import java.util.Enumeration;
  +import java.util.Collections;
  +
  +/**
  + * A resource bundle that use a map as content.
  + *
  + * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
  + * @version $Revision: 1.2 $
  + */
  +public class MapResourceBundle extends ResourceBundle
  +{
  +
  +   protected Map content;
  +
  +   public MapResourceBundle(Map content)
  +   {
  +      this.content = new HashMap(content);
  +   }
  +
  +   protected Object handleGetObject(String key)
  +   {
  +      if (key == null)
  +      {
  +         throw new NullPointerException();
  +      }
  +      return content.get(key);
  +   }
  +
  +   public Enumeration getKeys()
  +   {
  +      return Collections.enumeration(content.keySet());
  +   }
  +}
  
  
  


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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