Merge branch 'release/5.19.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / annotatedlineeditor / IEntityCreator.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.annotatedlineeditor;
10
11 import java.util.Map;
12
13 /**
14 * <p>IEntityCreator interface.</p>
15 *
16 * @author p.ciardelli
17 * @created 03.07.2009
18 */
19 public interface IEntityCreator<T> {
20
21 /**
22 * <p>createEntity</p>
23 *
24 * @param text a {@link java.lang.String} object.
25 * @return a T object.
26 */
27 public T createEntity(String text);
28
29 /**
30 * <p>createEntity</p>
31 *
32 * @param key a {@link java.lang.Object} object.
33 * @param text a {@link java.lang.String} object.
34 * @return a T object.
35 */
36 public T createEntity(Object key, String text);
37
38 /**
39 * Get a map of keys for all objects that can be created by this entity creator
40 * along with their string representations.
41 *
42 * @return a {@link java.util.Map} object.
43 */
44 public Map<? extends Object, String> getKeyLabelPairs();
45
46 /**
47 * Return a flag indicating whether this creator also saves the entities
48 *
49 * @return true or false
50 */
51 public boolean savesEntity();
52 }