Revision 8c8ead8a
Added by Cherian Mathew almost 9 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorInput.java | ||
---|---|---|
3 | 3 |
*/ |
4 | 4 |
package eu.etaxonomy.taxeditor.editor.key.polytomous; |
5 | 5 |
|
6 |
import java.util.Arrays; |
|
7 |
import java.util.List; |
|
6 | 8 |
import java.util.UUID; |
7 | 9 |
|
8 | 10 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
... | ... | |
36 | 38 |
this.name = name; |
37 | 39 |
} |
38 | 40 |
|
39 |
public void init() { |
|
40 |
this.key = CdmStore.getService(IPolytomousKeyService.class).load(keyUuid, null); |
|
41 |
} |
|
42 | 41 |
|
43 | 42 |
public static PolytomousKeyEditorInput NewInstance(UUID polytomousKeyUuid) throws Exception{ |
44 | 43 |
try{ |
... | ... | |
77 | 76 |
return super.equals(object); |
78 | 77 |
} |
79 | 78 |
|
79 |
/* (non-Javadoc) |
|
80 |
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities() |
|
81 |
*/ |
|
82 |
@Override |
|
83 |
public List<PolytomousKey> getRootEntities() { |
|
84 |
return Arrays.asList(key); |
|
85 |
} |
|
86 |
|
|
87 |
/* (non-Javadoc) |
|
88 |
* @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge() |
|
89 |
*/ |
|
90 |
@Override |
|
91 |
public void merge() { |
|
92 |
CdmStore.getService(IPolytomousKeyService.class).merge(key); |
|
93 |
} |
|
94 |
|
|
80 | 95 |
} |
Also available in: Unified diff
Update ICdmEntitySessionEnabled to no longer extend ICdmChangeListener