Interface or Abstract class
<p>My Java is a bit rusty, and I am sure I am doing this wrong</p>

<p>I have a whole bunch of different fileformats that I need to export. So I though I would create a class for each format, and have them all implement a standard Interface.</p>

<p>Each document has a name, and default filename, but I am not sure how I should store that data correctly. Initially I thought it should be a static final string in the concrete class, but then how do I enforce it via the interface so that all concrete classes have to supply that info.</p>

<p>Hope this makes sense, this is what I have so far</p>

<pre><code>public interface IExporter {

    public void exportToFile(String filename) throws SQLException, IOException;

    public String getDocumentName();

    public String getDefaultFilename();

}
</code></pre>

<p>-</p>

<pre><code>public class LaneDrawCsvExporter implements IExporter {

    public void exportToFile(String filename) throws SQLException, IOException {
         // code to export document here
    }

    public String getDocumentName() {
        return "Lane Draw";
    }

    public String getDefaultFilename() {
        return "Lane Draw.CSV";
    }
}
</code></pre>
