Class AbstractThreatTableExportHandler
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
be.kuleuven.cs.distrinet.sparta.analysis.handlers.AbstractAnalysisExportHandler
be.kuleuven.cs.distrinet.sparta.analysis.handlers.AbstractThreatTableExportHandler
- All Implemented Interfaces:
org.eclipse.core.commands.IHandler,org.eclipse.core.commands.IHandler2
- Direct Known Subclasses:
CSVExportHandler,XLSXExportHandler
Exports the current analysis results to a table file in the root of the analysed model's
project. Subclasses only provide the file name and the writer, so the CSV and XLSX
exports share the same columns (
ThreatExportColumns.withMetadata()) and user
feedback.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(org.eclipse.core.commands.ExecutionEvent event) protected abstract voidWrite the threats tofile, usingThreatExportColumns.withMetadata().protected abstract StringfileName()protected abstract StringMethods inherited from class be.kuleuven.cs.distrinet.sparta.analysis.handlers.AbstractAnalysisExportHandler
analysedProject, analysedThreats, checkResultsAvailableMethods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabledMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.commands.IHandler
getHandlerLabel
-
Constructor Details
-
AbstractThreatTableExportHandler
public AbstractThreatTableExportHandler()
-
-
Method Details
-
fileName
- Returns:
- the name of the file to create in the project root, e.g.
threats.csv
-
formatName
- Returns:
- a short format label used in messages, e.g.
CSV
-
export
Write the threats tofile, usingThreatExportColumns.withMetadata().- Throws:
IOException
-
execute
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException - Throws:
org.eclipse.core.commands.ExecutionException
-