kaapo.filemanager
Class ExportPlugin

java.lang.Object
  extended by kaapo.filemanager.ExportPlugin
Direct Known Subclasses:
EPSExport, ToStringExport

public abstract class ExportPlugin
extends Object

An abstract class to be subclassed by all export plugins.

Author:
paltamaa

Constructor Summary
ExportPlugin()
           
 
Method Summary
abstract  void export(Project project, DiagramWrapper visibleDiagram, File file, Component component)
          Exports the project object given as a parameter.
abstract  String getFileExtension()
          Returns the file extension used by subclassing plugin.
abstract  String getName()
          Returns the name of subclassing plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportPlugin

public ExportPlugin()
Method Detail

getName

public abstract String getName()
Returns the name of subclassing plugin.

Returns:
plugin name

getFileExtension

public abstract String getFileExtension()
Returns the file extension used by subclassing plugin.

Returns:
file extension

export

public abstract void export(Project project,
                            DiagramWrapper visibleDiagram,
                            File file,
                            Component component)
                     throws IOException,
                            ComponentNotSupportedException
Exports the project object given as a parameter. The implementing classes should note that the visible diagram parameter may be null.

Parameters:
project - the project to export
visibleDiagram - the current visible diagram
file - the file to be opened for reading
component - the component to show message dialogs on
Throws:
IOException - if an I/O error occurs
ComponentNotSupportedException - ExportPlugin may throw this exception if it cannot handle some object included in the project