}
public boolean updEvent(String id,Event newEvent,String path,String serName){
PersistenceStrategy strategy = new FilePersistenceStrategy(new File(path+"/"+serName));
// creates the list:
List list = new XmlArrayList(strategy);
for(Iterator it = list.iterator(); it.hasNext(); ) {
Event event = (Event) it.next();
if(event.getId().equals(id)) {
it.remove();
list.add(newEvent);
return true;
}
}
return false;
}