1
2
3
4
5
6
7
8
9
10
11
12 package sk.uniba.euromath.editor;
13 import java.util.Map;
14
15 import sk.baka.xml.gene.ExportException;
16 /***
17 * Produces editor instances.
18 * @author Martin Vysny
19 */
20 public interface IEditorFactory {
21 /***
22 * ID of extension point for editor factory instances.
23 */
24 public static final String EXTENSION_POINT_ID = "sk.uniba.euromath.IEditorFactory";
25 /***
26 * Produces an instance of editor denoted by given ID.
27 * @param id id of the editor.
28 * @return editor instance.
29 * @throws ExportException if error occurs during editor creation.
30 * @throws IllegalArgumentException if id is not known.
31 */
32 public IEditor produce(final String id) throws ExportException;
33 /***
34 * Returns map that maps ID of an editor to the information about that
35 * editor.
36 * @return maps ID to info about the editor. Factory should compute this map
37 * only once - it won't get modified.
38 * @throws ExportException if problem occurs.
39 */
40 public Map<String, EditorInfo> getSupportedEditors() throws ExportException;
41 }