org.eclipse.emf.emfstore.internal.client.importexport.impl
Class ExportProjectHistoryController

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.model.connectionmanager.ServerCall<Void>
      extended by org.eclipse.emf.emfstore.internal.client.importexport.impl.ExportProjectHistoryController
All Implemented Interfaces:
IExportImportController, APIDelegate<ESServerCall>

public class ExportProjectHistoryController
extends ServerCall<Void>
implements IExportImportController

Controller class for exporting a ProjectHistory.

Author:
emueller

Constructor Summary
ExportProjectHistoryController(ProjectInfo projectInfo)
          Constructor.
 
Method Summary
 void execute(File file, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Executes the controller.
 String getFilename()
          Returns the file name that is used for export/import.
 String[] getFilteredExtensions()
          Returns an array of extensions that should be filtered in the export/import dialog.
 String[] getFilteredNames()
          Returns an array of names that should be filtered in the export/import dialog.
 String getLabel()
          The label that should be shown while exporting/importing.
 String getParentFolderPropertyKey()
          Returns the key that is used to cache the last location of the export/import performed.
 boolean isExport()
          Whether this controller is an export controller.
 
Methods inherited from class org.eclipse.emf.emfstore.internal.client.model.connectionmanager.ServerCall
createAPI, execute, getProgressMonitor, getProjectSpace, getServer, getUsersession, run, setProgressMonitor, setServer, setSessionId, setUsersession, toAPI
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportProjectHistoryController

public ExportProjectHistoryController(ProjectInfo projectInfo)
Constructor.

Parameters:
projectInfo - the project info containing the history to be exported
Method Detail

getLabel

public String getLabel()
The label that should be shown while exporting/importing.

Specified by:
getLabel in interface IExportImportController
Returns:
a label that best describes the export/import process
See Also:
IExportImportController.getLabel()

getFilteredNames

public String[] getFilteredNames()
Returns an array of names that should be filtered in the export/import dialog.

Specified by:
getFilteredNames in interface IExportImportController
Returns:
an array of filtered names
See Also:
IExportImportController.getFilteredNames()

getFilteredExtensions

public String[] getFilteredExtensions()
Returns an array of extensions that should be filtered in the export/import dialog.

Specified by:
getFilteredExtensions in interface IExportImportController
Returns:
an array of file extensions
See Also:
IExportImportController.getFilteredExtensions()

getParentFolderPropertyKey

public String getParentFolderPropertyKey()
Returns the key that is used to cache the last location of the export/import performed.

Specified by:
getParentFolderPropertyKey in interface IExportImportController
Returns:
a property key identifier
See Also:
IExportImportController.getParentFolderPropertyKey()

execute

public void execute(File file,
                    org.eclipse.core.runtime.IProgressMonitor progressMonitor)
             throws IOException
Executes the controller.

Specified by:
execute in interface IExportImportController
Parameters:
file - the File that is either exported to or imported
progressMonitor - an IProgressMonitor that is used to inform about the progress of the export/import process
Throws:
IOException - in case an error occurs during export/import
See Also:
IExportImportController.execute(java.io.File, org.eclipse.core.runtime.IProgressMonitor)

getFilename

public String getFilename()
Returns the file name that is used for export/import.

Specified by:
getFilename in interface IExportImportController
Returns:
the file name
See Also:
IExportImportController.getFilename()

isExport

public boolean isExport()
Whether this controller is an export controller.

Specified by:
isExport in interface IExportImportController
Returns:
true, if this controller exports an entity of type T, otherwise this controller imports an entity of type T
See Also:
IExportImportController.isExport()


Copyright © 2015. All Rights Reserved.