Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Import / Export

Import

Create an Import Command.
This import command will be triggered by a ImportSaveDialogAction linked to ImportFildeDialog. This Dialog should use the FileUpload Filed.

Sequence:

 

  1. Import Workbench Action is clicked (Generic CreateDialogActionDefinition-->ui-admincentral:import). 

    Todo

    Class info.magnolia.ui.admincentral.dialog.action.CreateDialogActionDefinition is replaced by info.magnolia.ui.framework.action.OpenCreateDialogActionDefinition.

    Jira
    serverMagnolia
    keyMGNLUI-1290

    1. Get the selected Item from the TreeTable
    2. Call the Action (Creation of a configured Dialog)
  2. Once a file is selected (uploaded), and ckick on the SaveImportDialogAction is performed
    1. Get the Input file as an InputStream
    2. Call the ImportCommand
    3. Event sending(call refresh of the TreeView) and closing Dialog is handled by the presenter.getCallback().onSuccess() call and implementation. 

Export

Create an Export Command (ExportCommand).
This export command used a (ExportStreamer) class in order to create a Vaadin Resource based on the OutputStream containing the xml and trigger the Upload on the client side.

Sequence:

 

  1. ExportAction is clicked (class ExportAction extends CommandActionBase<ExportActionDefinition>

    Todo

    Class info.magnolia.ui.framework.app.action.CommandActionBase is replaced by info.magnolia.ui.framework.action.AbstractActionBase.

    Jira
    serverMagnolia
    keyMGNLUI-1290

    1. Fill paramMap used by the Command (path of the Node to export, extension...)
    2. Call the Export Command (create an XML representation of a selected Node, and Fill an OutputStream)
    3. On executePostCommand,
      1. get param back from the Command (OutputStream, File name, mimeType)
      2. Call the ExportStreamer.openFileInBlankWindow(... in order to trigger the Upload request from the client side.

 

Import/Export Action improvement:

Jira
serverMagnolia
keyMGNLUI-883