// new AggregatedLayout with root node only to get started
AggregatedLayout al = new AggregatedLayout("userLayoutRootNode",alm);
// Give it to the layout manager
alm.setUserLayout(al);
// Initialize the layout store
AggregatedUserLayoutStore als = new AggregatedUserLayoutStore();
// Set the layout manager to use the new store
alm.setLayoutStore(als);
// set the layout to the DOM created from the old simple manager
alm.setUserLayoutDOM(ul);
// persist the new layout to the store
// creates new layout with id 1
alm.saveUserLayout();
// add the new profile
als.addUserProfile(user,ALProfile);
} catch (Exception e) {
System.out.println("Error saving aggregated layout for user_id "+uid);
e.printStackTrace();
}
System.out.println("Saved aggregated layout for user_id "+uid+