reintegrated model changes from branch 3.3-MC-SNAPSHOT
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / annotatedlineeditor / IEntityCreator.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 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
11 package eu.etaxonomy.taxeditor.annotatedlineeditor;
12
13 import java.util.Map;
14
15 import eu.etaxonomy.cdm.model.common.ICdmBase;
16
17
18 /**
19 * <p>IEntityCreator interface.</p>
20 *
21 * @author p.ciardelli
22 * @created 03.07.2009
23 * @version 1.0
24 */
25 public interface IEntityCreator<T> {
26
27 /**
28 * <p>createEntity</p>
29 *
30 * @param text a {@link java.lang.String} object.
31 * @param <T> a T object.
32 * @return a T object.
33 */
34 T createEntity(String text);
35
36 /**
37 * <p>createEntity</p>
38 *
39 * @param key a {@link java.lang.Object} object.
40 * @param text a {@link java.lang.String} object.
41 * @return a T object.
42 */
43 T createEntity(Object key, String text);
44
45 /**
46 * Get a map of keys for all objects that can be created by this entity creator
47 * along with their string representations.
48 *
49 * @return a {@link java.util.Map} object.
50 */
51 Map<Object, String> getKeyLabelPairs();
52
53 /**
54 * Return a flag indicating whether this creator also saves the entities
55 *
56 * @return true or false
57 */
58 boolean savesEntity();
59
60
61 }