3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.taxeditor
.bulkeditor
.input
;
13 import java
.util
.Arrays
;
14 import java
.util
.List
;
15 import java
.util
.UUID
;
17 import eu
.etaxonomy
.cdm
.api
.service
.config
.IIdentifiableEntityServiceConfigurator
;
18 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
19 import eu
.etaxonomy
.taxeditor
.annotatedlineeditor
.IEntityCreator
;
20 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * <p>NameRelationshipEditorInput class.</p>
27 * @created Oct 19, 2010
30 public class NameRelationshipEditorInput
extends AbstractBulkEditorInput
<NameRelationship
> {
35 private static final long serialVersionUID
= -7453923697752787687L;
37 /** Constant <code>ID="bulkeditor.input.nameRelationship"</code> */
38 public static final String ID
= "bulkeditor.input.nameRelationship";
40 private static NameRelationshipEditorInput instance
;
43 * <p>Getter for the field <code>instance</code>.</p>
45 * @return a {@link eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput} object.
47 public static AbstractBulkEditorInput
<NameRelationship
> getInstance(){
49 instance
= new NameRelationshipEditorInput();
55 * @see org.eclipse.ui.IEditorInput#getName()
59 public String
getName() {
60 return BulkEditorInputType
.NAME_RELATIONSHIP
.label
;
64 * @see org.eclipse.ui.IEditorInput#getToolTipText()
68 public String
getToolTipText() {
73 * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#save(java.lang.Object)
77 public boolean save(NameRelationship entity
) {
78 // TODO Auto-generated method stub
83 * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#delete(java.lang.Object)
87 public boolean delete(NameRelationship entity
) {
88 // TODO Auto-generated method stub
93 * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#listEntities(eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator)
97 protected List
<NameRelationship
> listEntities(
98 IIdentifiableEntityServiceConfigurator configurator
) {
99 return CdmStore
.getSearchManager().findNameRelationships(configurator
);
103 * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
107 protected NameRelationship
loadEntity(UUID entityUuid
) {
108 List
<String
> propertyPaths
= Arrays
.asList(new String
[]{});
109 return null; // CdmStore.getNameService().load(entityUuid, propertyPaths);
113 * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#createEntityCreator()
116 protected IEntityCreator
<NameRelationship
> createEntityCreator() {
117 MessagingUtils
.notImplementedMessage(getClass());
122 * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
125 public String
getTypeText(Object entity
) {
126 if(entity
instanceof NameRelationship
){
127 return ((NameRelationship
) entity
).getType().getTitleCache();
130 return super.getTypeText(entity
);
134 * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
137 public void merge() {