Saves the docking layout of a docking page fo the application

@param dockingPage
The application window (needed to hook in for the docking context)
543404
private void saveDockingContext(VLDockingApplicationPage dockingPage) {
        DockingContext dockingContext = dockingPage.getDockingContext();

        // Page descriptor needed for config path
        VLDockingPageDescriptor vlDockingPageDescriptor = ValkyrieRepository.getInstance().getBean(dockingPage.getId(), VLDockingPageDescriptor.class);

        // Write docking context to file
        BufferedOutputStream buffOs = null;
        try {
            File desktopLayoutFile = vlDockingPageDescriptor.getInitialLayout().getFile();
            checkForConfigPath(desktopLayoutFile);

            buffOs = new BufferedOutputStream(new FileOutputStream(desktopLayoutFile));
            dockingContext.writeXML(buffOs);
            buffOs.close();
            logger.debug("Wrote docking context to config file " + desktopLayoutFile);

        }
        catch (IOException e) {
            logger.warn("Error writing VLDocking config", e);
        }
        finally {
            try {
                if(buffOs != null)
                    buffOs.close();
            }
            catch (Exception e) {
                logger.debug("Error closing layoutfile", e);
            }
        }
    }
562838
public void insert(final Widget page, final Widget tab, final int beforeIndex) {
        final String text = (tab instanceof HasText) ? ((HasText) tab).getText() : "Tab #" + beforeIndex;

        if (beforeIndex < PAGE_LIMIT - 1) {
            // visible pages
            Tab t = tabs.add(text, beforeIndex);
            super.insert(page, t, beforeIndex);

        } else if (beforeIndex == PAGE_LIMIT - 1) {
            // last visible page
            Tab t = tabs.add(text, beforeIndex);
            offPageContainer.add(new OffPageText(0, text), page);
            super.insert(offPageContainer.asWidget(), t, beforeIndex);

        } else {
            // off page - don't use beforeIndex as it'll always be PAGE_LIMIT
            int last = offPageContainer.size();
            offPageContainer.add(new OffPageText(last, text), page);
            tabs.showSelector();
        }
    }
1041949
public static void saveLayout(Layout layout, LayoutIdentifier layoutId, boolean hideScope,
                                  IResponseCallback<LayoutIdentifier> callback) {
        LayoutPrompt.show(layoutId, hideScope, true, CAP_LAYOUT_SAVE, MSG_LAYOUT_SAVE, (event) -> {
            LayoutIdentifier id = event.getTarget().getAttribute("layoutId", LayoutIdentifier.class);
            
            if (id != null) {
                layout.saveToProperty(id);
                
                if (callback != null) {
                    callback.onComplete(id);
                }
            }
            
        }
1361143
public void savePreviousPageInfo( ActionForward forward, ActionForm form, ActionMapping mapping,
                                      HttpServletRequest request, ServletContext servletContext,
                                      boolean isSpecialForward )
    {
    }
1244432
void setPage(Page page) {
		synchronized(lock) {
			checkNotFrozen();
			if(this.page != null) throw new IllegalStateException("element already has a page: " + this);
			this.page = page;
		}
		assert checkPageAndParentElement();
	}
1229443
public void saveExecuteChildren(Page page, Boolean doExecuteChildren) {
        ContentEntityObject entityObject = getContentEntityManager().getById(page.getId());
        getContentPropertyManager().setStringProperty(entityObject, ConfluenceGreenPepper.EXECUTE_CHILDREN, doExecuteChildren != null ? String.valueOf(doExecuteChildren) : null);
    }
675828
private void setPageParam(int page) {
        pageParam.set(0, Integer.toString(page));
        queryParams.put(PAGE_PARAM, pageParam);
    }
733005
private void installLayout(JRootPane root) {
        if (layoutManager == null) {
            layoutManager = createLayoutManager();
        }

        savedOldLayout = root.getLayout();
        root.setLayout(layoutManager);
    }
1207256
void saveToUser() {

        List<String> apps = new ArrayList<String>();
        int count = m_userApps.getComponentCount();
        for (int i = 0; i < count; i++) {
            Button button = (Button)m_userApps.getComponent(i);
            apps.add((String)button.getData());
        }

        try {
            OpenCms.getWorkplaceAppManager().setUserQuickLaunchApps(A_CmsUI.getCmsObject(), apps);
        } catch (Exception e) {
            CmsErrorDialog.showErrorDialog("Could not write user Quicklaunch apps", e);
        }
    }
276708
protected static void closeWelcomePage() {
		final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
		if (introManager != null) {
			final IIntroPart intro = introManager.getIntro();
			if (intro != null) {
				introManager.closeIntro(intro);
			}
		}
	}
505157
private boolean isModelPage(CmsObject cms, CmsResource containerPage) {

        CmsADEConfigData config = getConfigData(containerPage.getRootPath());
        for (CmsModelPageConfig modelConfig : config.getModelPages()) {
            if (modelConfig.getResource().getStructureId().equals(containerPage.getStructureId())) {
                return true;
            }
        }
        return false;
    }
1316631
public void writeContainerPage(CmsObject cms, CmsContainerPageBean cntPage) throws CmsException {

        // keep unused containers
        CmsContainerPageBean savePage = cleanupContainersContainers(cms, cntPage);
        savePage = removeEmptyContainers(cntPage);
        // Replace existing locales with master locale
        for (Locale locale : getLocales()) {
            removeLocale(locale);
        }
        Locale masterLocale = CmsLocaleManager.MASTER_LOCALE;
        addLocale(cms, masterLocale);

        // add the nodes to the raw XML structure
        Element parent = getLocaleNode(masterLocale);
        saveContainerPage(cms, parent, savePage);
        initDocument(m_document, m_encoding, m_contentDefinition);
    }
1171107
public function initializeLayout($page, \LayoutModel $layout)
	{
		static::$pageLayout = $layout;

		if(!static::isEnabled())
		{
			return;
		}

		// reset default framework
		static::$pageLayout->framework = null;

		$templates = $GLOBALS['BOOTSTRAP']['templates']['dynamicLoad'];

		// only load these templates if layout uses it because default templates are changed
		foreach ($templates as $path => $templates)
		{
			foreach ($templates as $template)
			{
				\TemplateLoader::addFile($template, $path);
			}
		}
	}
897371
@InService(SegmentServiceImpl.class)
  public
  Page writePage(Page page,
                 long oldSequence,
                 int saveLength,
                 int saveTail,
                 int saveSequence,
                 Result<Integer> result)
  {
    if (isClosed()) {
      return null;
    }
    
    // Type type = page.getType();
    int pid = page.getId();
    int nextPid = page.getNextId();
    
    WriteStream out = out();
    
    int head = (int) out.position();
    
    try {
      int available = getAvailable();
      
      if (available < head + page.size()) {
        return null;
      }
      
      Page newPage = page.writeCheckpoint(_table, this, oldSequence,
                                          saveLength, saveTail, saveSequence);

      if (newPage == null) {
        return null;
      }
      
      newPage.setSequence(getSequence());
      
      out = out();
      
      int tail = (int) out.position();

      if (addIndex(out, page, newPage,
                   saveSequence, newPage.getLastWriteType(), 
                   pid, nextPid, head, tail - head,
                   result)) {
        return newPage;
      }
      else {
        return null;
      }
    } catch (Exception e) {
      e.printStackTrace();
      return null;
    }
  }
942437
public void addNavButtons()
    {
        ResourceBundle resources = ((BaseApplication)this.getTask().getApplication()).getResources(ResourceConstants.PROGRAM_RESOURCE, true);
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.GROUP, ClassProject.RESOURCE_DETAIL_SCREEN, resources.getString(ClassProject.RESOURCE_DETAIL_SCREEN));
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.DISTRIBUTION, ClassProject.CLASS_DETAIL_SCREEN, resources.getString(ClassProject.CLASS_DETAIL_SCREEN));
        super.addNavButtons();
    }
730860
def saveProfileLayout(self, profile):
        
        if not self.viewWidget():
            text = self.profileText()
            QMessageBox.information(self.window(), 
                                    'Could Not Save {0}'.format(text),
                                    'Error saving layout, '\
                                    'No View Widget Assigned')
            return
        
        # save the profile from the view widget
        prof = self.viewWidget().saveProfile()
        profile.setXmlElement(prof.xmlElement())
        
        if not self.signalsBlocked():
            self.profileChanged.emit(profile)
1313995
public void setLayout(java.lang.String layout) {
        getStateHelper().put(PropertyKeys.layout, layout);
    }