// Get all installed widgets
IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
IWidget[] widgets = persistenceManager.findAll(IWidget.class);
for (IWidget widget: widgets){
// Check for a valid update document; if there is one, create a new UpdateInformation object and add to list
UpdateDescriptionDocument udd = UpdateUtils.checkForUpdate(widget.getUpdateLocation(), widget.getVersion());
if (udd != null){
UpdateInformation info = new UpdateInformation();
info.setUpdateDescriptionDocument(udd);
info.setWidget(widget);
updates.add(info);