Revision 49a64920
Added by Cherian Mathew almost 11 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ModifierSection.java | ||
---|---|---|
13 | 13 |
import java.util.Collection; |
14 | 14 |
|
15 | 15 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
16 |
import eu.etaxonomy.cdm.model.common.DefinedTerm; |
|
16 | 17 |
import eu.etaxonomy.cdm.model.description.IModifiable; |
17 |
import eu.etaxonomy.cdm.model.description.Modifier; |
|
18 | 18 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
19 | 19 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
20 | 20 |
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection; |
... | ... | |
26 | 26 |
* @created Sep 15, 2010 |
27 | 27 |
* @version 1.0 |
28 | 28 |
*/ |
29 |
public class ModifierSection extends AbstractEntityCollectionSection<IModifiable, Modifier> {
|
|
29 |
public class ModifierSection extends AbstractEntityCollectionSection<IModifiable, DefinedTerm> {
|
|
30 | 30 |
|
31 | 31 |
/** |
32 | 32 |
* <p>Constructor for ModifierSection.</p> |
... | ... | |
44 | 44 |
|
45 | 45 |
/** {@inheritDoc} */ |
46 | 46 |
@Override |
47 |
public Collection<Modifier> getCollection(IModifiable entity) {
|
|
47 |
public Collection<DefinedTerm> getCollection(IModifiable entity) {
|
|
48 | 48 |
return entity.getModifiers(); |
49 | 49 |
} |
50 | 50 |
|
51 | 51 |
/** {@inheritDoc} */ |
52 | 52 |
@Override |
53 |
public Modifier createNewElement() {
|
|
54 |
return Modifier.NewInstance();
|
|
53 |
public DefinedTerm createNewElement() {
|
|
54 |
return DefinedTerm.NewInstance();
|
|
55 | 55 |
} |
56 | 56 |
|
57 | 57 |
/** {@inheritDoc} */ |
58 | 58 |
@Override |
59 |
public void addElement(Modifier element) {
|
|
59 |
public void addElement(DefinedTerm element) {
|
|
60 | 60 |
getEntity().addModifier(element); |
61 | 61 |
} |
62 | 62 |
|
63 | 63 |
/** {@inheritDoc} */ |
64 | 64 |
@Override |
65 |
public void removeElement(Modifier element) {
|
|
65 |
public void removeElement(DefinedTerm element) {
|
|
66 | 66 |
getEntity().removeModifier(element); |
67 | 67 |
} |
68 | 68 |
|
Also available in: Unified diff
Aligning Editor with 3.3 model changes. First phase commit which updates only the classes.
Branch not compilable at the moment.