1 23 package org.infoglue.deliver.portal.om; 24 25 import java.util.Iterator ; 26 import java.util.List ; 27 28 import org.apache.pluto.om.common.ObjectID; 29 import org.apache.pluto.om.entity.PortletEntity; 30 import org.apache.pluto.om.entity.PortletEntityList; 31 32 36 public class PortletEntityListImpl implements PortletEntityList { 37 38 private List entities; 39 40 public PortletEntityListImpl(List entities) { 41 this.entities = entities; 42 } 43 44 47 public Iterator iterator() { 48 return entities.iterator(); 49 } 50 51 54 public PortletEntity get(ObjectID id) { 55 for (Iterator it = entities.iterator(); it.hasNext();) { 56 PortletEntity pe = (PortletEntity) it.next(); 57 if (pe.getId().equals(id)) { 58 return pe; 59 } 60 } 61 return null; 62 } 63 64 public void add(PortletEntity e) { 65 entities.add(e); 66 } 67 } 68 | Popular Tags |