portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jf...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/common/impl GenericMetadataImpl.java
Date Mon, 08 Mar 2004 15:59:47 GMT
jford       2004/03/08 07:59:47

  Modified:    components/registry/src/java/org/apache/jetspeed/om/common/impl
                        GenericMetadataImpl.java
  Log:
  Must put values into MultiMap 1 by 1
  
  Revision  Changes    Path
  1.3       +12 -10    jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/common/impl/GenericMetadataImpl.java
  
  Index: GenericMetadataImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/common/impl/GenericMetadataImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GenericMetadataImpl.java	27 Feb 2004 03:12:38 -0000	1.2
  +++ GenericMetadataImpl.java	8 Mar 2004 15:59:47 -0000	1.3
  @@ -53,13 +53,7 @@
           field.setValue(value);
           field.setLocale(locale);
           
  -        if(fields == null)
  -        {
  -            fields = new ArrayList();
  -        }
  -        
  -        fields.add(field);
  -        fieldMap.put(name, field);
  +        addField(field);
       }
   
       /* (non-Javadoc)
  @@ -90,8 +84,16 @@
       public void setFields(String name, Collection values)
       {
           fieldMap.remove(name);
  -        fieldMap.put(name, values);
  -        fields.removeAll(values);
  +        if(values != null)
  +        {    
  +            Iterator iter = values.iterator();
  +            while(iter.hasNext())
  +            {
  +                LocalizedField field = (LocalizedField)iter.next();
  +                fieldMap.put(field.getName(), field);
  +            }
  +            fields.removeAll(values);
  +        }
       }
       
       /**
  
  
  

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


Mime
View raw message