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 ) ; } } }
Saves the docking layout of a docking page fo the application