@Override public LayoutTemplate getLayoutTemplate(Plugin perspectivePlugin) { LayoutEditorModel layoutEditorModel = pluginServices.getLayoutEditor(perspectivePlugin.getPath(), PluginType.PERSPECTIVE_LAYOUT); return layoutServices.convertLayoutFromString(layoutEditorModel.getLayoutEditorModel()); }
@Override public LayoutTemplate getLayoutTemplate(Plugin perspectivePlugin) { LayoutEditorModel layoutEditorModel = pluginServices.getLayoutEditor(perspectivePlugin.getPath(), PluginType.PERSPECTIVE_LAYOUT); return layoutServices.convertLayoutFromString(layoutEditorModel.getLayoutEditorModel()); }
@Override public LayoutTemplate getLayoutTemplate(Path perspectivePath) { LayoutEditorModel layoutEditorModel = pluginServices.getLayoutEditor(perspectivePath, PluginType.PERSPECTIVE_LAYOUT); if (layoutEditorModel.isEmptyLayout()) { return new LayoutTemplate(layoutEditorModel.getName(), LayoutTemplate.Style.PAGE); } return layoutServices.convertLayoutFromString(layoutEditorModel.getLayoutEditorModel()); }
@Override public LayoutTemplate getLayoutTemplate(Path perspectivePath) { LayoutEditorModel layoutEditorModel = pluginServices.getLayoutEditor(perspectivePath, PluginType.PERSPECTIVE_LAYOUT); if (layoutEditorModel.isEmptyLayout()) { return new LayoutTemplate(layoutEditorModel.getName(), LayoutTemplate.Style.PAGE); } return layoutServices.convertLayoutFromString(layoutEditorModel.getLayoutEditorModel()); }
@Override public org.uberfire.backend.vfs.Path saveLayout(LayoutEditorModel plugin, String commitMessage) { final Path pluginPath = convert(plugin.getPath()); final boolean isNewPlugin = !getIoService().exists(pluginPath); try { getIoService().startBatch(fileSystem, commentedOption(commitMessage)); final Path itemsPath = getLayoutEditorPath(getPluginPath(plugin.getName()), plugin.getType().toString().toLowerCase()); getIoService().write(itemsPath, plugin.getLayoutEditorModel()); updatePlugin(pluginPath, plugin, isNewPlugin); } finally { getIoService().endBatch(); } return plugin.getPath(); }