View Javadoc

1   /*
2    * Created on Jul 24, 2005. Copyright 1999-2006 Faculty of Mathematics, Physics
3    * and Informatics, Comenius University, Bratislava. This file is protected by
4    * the Mozilla Public License version 1.1 (the "License"); you may not use this
5    * file except in compliance with the License. You may obtain a copy of the
6    * License at http://euromath2.sourceforge.net/license.html Unless required by
7    * applicable law or agreed to in writing, software distributed under the
8    * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
9    * OF ANY KIND, either express or implied. See the License for the specific
10   * language governing permissions and limitations under the License.
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"; //$NON-NLS-1$
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  }