Project

General

Profile

Download (1.45 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2015 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.taxeditor.view;
11

    
12
import java.util.Map;
13

    
14
import org.eclipse.core.commands.ExecutionEvent;
15

    
16

    
17
/**
18
 * Implementors of this interface provide a mapping of input elements to views
19
 * or editors which can display information or provide editing functionality for
20
 * the input elements.
21
 *
22
 * @author pplitzner
23
 * @date Feb 23, 2015
24
 *
25
 */
26
public interface ICdmViewer {
27

    
28
    /**
29
     * For the given input a map specifying the available viewers classes as
30
     * keys and their string representation as values is returned
31
     *
32
     * @param input
33
     *            the input for which the viewer classes should be returned
34
     * @return a map holding the viewer classes as keys and their string
35
     *         representations as values
36
     */
37
    public Map<Class<?>, String> getViewerClasses(Object input);
38

    
39
    /**
40
     * Opens the viewer defined by the given viewerClass for the given input.
41
     * @param input the input for which a viewer should be opened
42
     * @param viewerClass the qualified class name of the viewer
43
     * @param event the {@link ExecutionEvent} if invoked via command/handler
44
     */
45
    public void show(Object input, Class<?> viewerClass, ExecutionEvent event);
46

    
47
}
(7-7/7)