www.sdmetrics.com

com.sdmetrics.output
Class OverwriteConfirmation

java.lang.Object
  extended by com.sdmetrics.output.OverwriteConfirmation

public class OverwriteConfirmation
extends java.lang.Object

Confirmation to overwrite existing files.

The output classes use an instance of this class to check if they can overwrite a given file. Implementations of this class may prompt the user on the console, pop up a modal "OK to overwrite" dialog, etc. This default implementation OKs to overwrite any file without any user interaction.


Constructor Summary
OverwriteConfirmation()
           
 
Method Summary
 boolean okToOverwrite(java.lang.String fileName, boolean oneFile)
          Checks if a file to write exists, and if so, if it can be overwritten.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverwriteConfirmation

public OverwriteConfirmation()
Method Detail

okToOverwrite

public boolean okToOverwrite(java.lang.String fileName,
                             boolean oneFile)
Checks if a file to write exists, and if so, if it can be overwritten.

Parameters:
fileName - the file SDMetrics wants to write to
oneFile - true if this is a single file export, false if this is a multi file export (and a dialog may offer a "yes to all" option)
Returns:
true if the file does not exist yet or can be overwritten, false if the exists and must not be overwritten.

www.sdmetrics.com