Package com.tick42.glue.internal.layouts
Class LayoutsManager
java.lang.Object
com.tick42.glue.internal.layouts.LayoutsManager
- All Implemented Interfaces:
AsynchronousCloseable,Layouts,AutoCloseable
public class LayoutsManager extends Object implements Layouts, AsynchronousCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tick42.glue.desktop.layouts.Layouts
Layouts.SaveRequestListener -
Constructor Summary
Constructors Constructor Description LayoutsManager(Interop interop, reactor.core.scheduler.Scheduler scheduler, ApplicationManager appManager) -
Method Summary
Modifier and Type Method Description CompletionStage<Void>closeAsync()Initiates a shutdown.CompletionStage<Void>delete(LayoutType type, String name)Delete a layout via its name and typeCompletionStage<Collection<Layout>>exportLayouts()Exports the layouts of this user for external use.CompletionStage<Void>importLayouts(Collection<Layout> layouts, LayoutImportMode mode)Imports layouts by either merging them or replacing them.Collection<Layout>list()Lists available layouts.CompletionStage<Void>onClose()Return a stage that will complete whenAsynchronousCloseable.closeAsync()is called and shutdown completes.voidonSave(Layouts.SaveRequestListener listener)Provides additional context to be saved with the layout.CompletionStage<Void>restore(LayoutRestoreOptions options)Restore a layout viaLayoutRestoreOptions.CompletionStage<Void>save(Consumer<NewLayoutOptions.Builder<?>> options)Saves the currently setup layout.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tick42.glue.core.AsynchronousCloseable
close
-
Constructor Details
-
LayoutsManager
public LayoutsManager(Interop interop, reactor.core.scheduler.Scheduler scheduler, ApplicationManager appManager)
-
-
Method Details
-
save
Description copied from interface:LayoutsSaves the currently setup layout. It uses a Consumer with parameters for the new layout. The only mandatory parameter is a name. If a name has not been specified a random name will be generated instead. -
restore
Description copied from interface:LayoutsRestore a layout viaLayoutRestoreOptions. -
delete
Description copied from interface:LayoutsDelete a layout via its name and type -
list
Description copied from interface:LayoutsLists available layouts. -
importLayouts
Description copied from interface:LayoutsImports layouts by either merging them or replacing them.- Specified by:
importLayoutsin interfaceLayouts- Parameters:
layouts- collection of layouts to importmode- mode of import - merge or replace- Returns:
- CompletionStage to indicate completion or problems
-
exportLayouts
Description copied from interface:LayoutsExports the layouts of this user for external use.- Specified by:
exportLayoutsin interfaceLayouts- Returns:
- Collection of all
Layoutinstances.
-
onSave
Description copied from interface:LayoutsProvides additional context to be saved with the layout.- Specified by:
onSavein interfaceLayouts- Parameters:
listener- typeLayouts.SaveRequestListener
-
onClose
Description copied from interface:AsynchronousCloseableReturn a stage that will complete whenAsynchronousCloseable.closeAsync()is called and shutdown completes.- Specified by:
onClosein interfaceAsynchronousCloseable- Returns:
- a stage that will complete when shutdown is complete, never
null
-
closeAsync
Description copied from interface:AsynchronousCloseableInitiates a shutdown.- Specified by:
closeAsyncin interfaceAsynchronousCloseable- Returns:
- a stage that will complete when shutdown is complete, never
null
-