/** * Saves the loaded layout in the database for the user and profile. * * @param view * @param owner * @throws Exception */ private void saveLayout(UserView view, IPerson owner) throws Exception { IUserProfile profile = new UserProfile(); profile.setProfileId(view.getProfileId()); userLayoutStore.setUserLayout(owner, profile, view.getLayout(), true, false); }
@Override public synchronized void saveUserLayout() throws PortalException { Document uld = this.getUserLayoutDOM(); if (uld == null) { throw new PortalException( "UserLayout has not been initialized for " + owner.getUserName() + "."); } try { this.distributedLayoutStore.setUserLayout(this.owner, this.profile, uld, channelsAdded); } catch (Exception e) { throw new PortalException( "Exception encountered while " + "saving layout for userId=" + this.owner.getID() + ", profileId=" + this.profile.getProfileId(), e); } this.channelsAdded = false; }