ref #6190 removing svn property place holder in first line of code - java files
[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
10 package eu.etaxonomy.taxeditor.annotatedlineeditor;
11
12 import java.util.Map;
13
14 import eu.etaxonomy.cdm.model.common.ICdmBase;
15
16
17 /**
18 * <p>IEntityCreator interface.</p>
19 *
20 * @author p.ciardelli
21 * @created 03.07.2009
22 * @version 1.0
23 */
24 public interface IEntityCreator<T> {
25
26 /**
27 * <p>createEntity</p>
28 *
29 * @param text a {@link java.lang.String} object.
30 * @param <T> a T object.
31 * @return a T object.
32 */
33 T createEntity(String text);
34
35 /**
36 * <p>createEntity</p>
37 *
38 * @param key a {@link java.lang.Object} object.
39 * @param text a {@link java.lang.String} object.
40 * @return a T object.
41 */
42 T createEntity(Object key, String text);
43
44 /**
45 * Get a map of keys for all objects that can be created by this entity creator
46 * along with their string representations.
47 *
48 * @return a {@link java.util.Map} object.
49 */
50 Map<Object, String> getKeyLabelPairs();
51
52 /**
53 * Return a flag indicating whether this creator also saves the entities
54 *
55 * @return true or false
56 */
57 boolean savesEntity();
58
59
60 }