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

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.importexport.impl.ImportChangesController
All Implemented Interfaces:
IExportImportController

public class ImportChangesController
extends Object
implements IExportImportController

A controller for importing changes which then will be applied upon a given ProjectSpaceBase.

Author:
emueller

Constructor Summary
ImportChangesController(ProjectSpaceBase projectSpace)
          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 java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportChangesController

public ImportChangesController(ProjectSpaceBase projectSpace)
Constructor.

Parameters:
projectSpace - the ProjectSpaceBase upon which to apply the changes being imported
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.