View Javadoc

1   package at.ac.tuwien.ifs.bpse.basic.export_import;
2   
3   import java.io.IOException;
4   import java.util.List;
5   
6   import at.ac.tuwien.ifs.bpse.basic.domain.Student;
7   
8   
9   
10  /**
11   * This interface specifies methods for exporting Students.
12   * 
13   * @author The SE-Team
14   * @version 1.0
15   */
16  public interface Export {
17  
18  	/**
19  	 * Writes the given Students to the given file. The file-structure is
20  	 * determined by the implementing class.
21  	 * 
22  	 * @param studenten
23  	 *            The <code>Student</code>s to export.
24  	 * @param filename
25  	 *            The destination-file.
26  	 * @throws IOException
27  	 *             on error while writing the file.
28  	 */
29  	public void write(List<Student> studenten, String filename)
30  			throws IOException;
31  
32  	/**
33  	 * Returns the used file-extension. This method is required to give the GUI
34  	 * components feedback which file extension this Export Type will create.
35  	 * 
36  	 * @return file-extension, eg. <code>xml</code>
37  	 */
38  	public String getExtension();
39  
40  }