Package lu.kbra.modelizer_next.cmdline
Class ConsoleDocumentLoadHandler
java.lang.Object
lu.kbra.modelizer_next.cmdline.ConsoleDocumentLoadHandler
- All Implemented Interfaces:
DocumentLoadHandler
Document load handler that reports load failures to the console instead of showing Swing dialogs.
-
Constructor Summary
ConstructorsConstructorDescriptionConsoleDocumentLoadHandler(boolean force) Creates a console document load handler instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfirmLegacyImport(File file) Confirms whether the legacy import should continue.booleanconfirmNewerVersion(String fileVersion, String appVersion) Confirms whether the newer version should continue.voidReports the error.
-
Constructor Details
-
ConsoleDocumentLoadHandler
public ConsoleDocumentLoadHandler(boolean force) Creates a console document load handler instance.- Parameters:
force- whether force is enabled
-
-
Method Details
-
confirmLegacyImport
Confirms whether the legacy import should continue.- Specified by:
confirmLegacyImportin interfaceDocumentLoadHandler- Parameters:
file- file to read or write- Returns:
truewhen the condition is met; otherwisefalse
-
confirmNewerVersion
Confirms whether the newer version should continue.- Specified by:
confirmNewerVersionin interfaceDocumentLoadHandler- Parameters:
fileVersion- text value for file versionappVersion- text value for application version- Returns:
truewhen the condition is met; otherwisefalse
-
error
Reports the error.- Specified by:
errorin interfaceDocumentLoadHandler- Parameters:
message- message shown to the caller or userex- exception that caused the failure
-