}
@Override
public void save(Dashboard dashboard) {
// sort widgets
Collections.sort(dashboard.getWidgets(), new WidgetComparator());
try {
xstream.toXML(dashboard, new FileOutputStream(file));
} catch (Exception e) {
log.error("Error while saving dashboard", e);