2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.bulkeditor
.input
;
12 import java
.util
.Arrays
;
13 import java
.util
.List
;
14 import java
.util
.UUID
;
16 import eu
.etaxonomy
.cdm
.api
.service
.config
.DeleteConfiguratorBase
;
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 public String
getName() {
56 return BulkEditorInputType
.NAME_RELATIONSHIP
.label
;
60 * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#save(java.lang.Object)
64 public NameRelationship
save(NameRelationship entity
) {
65 // TODO Auto-generated method stub
70 * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#delete(java.lang.Object)
74 public boolean delete(NameRelationship entity
, DeleteConfiguratorBase config
) {
75 // TODO Auto-generated method stub
80 * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#listEntities(eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator)
84 protected List
<NameRelationship
> listEntities(
85 IIdentifiableEntityServiceConfigurator configurator
) {
86 return CdmStore
.getSearchManager().findNameRelationships(configurator
);
90 * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
94 protected NameRelationship
loadEntity(UUID entityUuid
) {
95 List
<String
> propertyPaths
= Arrays
.asList(new String
[]{});
96 return null; // CdmStore.getNameService().load(entityUuid, propertyPaths);
100 * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#createEntityCreator()
103 protected IEntityCreator
<NameRelationship
> createEntityCreator() {
104 MessagingUtils
.notImplementedMessage(getClass());
109 * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
112 public String
getTypeText(Object entity
) {
113 if(entity
instanceof NameRelationship
){
114 return ((NameRelationship
) entity
).getType().getTitleCache();
117 return super.getTypeText(entity
);
121 * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
124 public void merge() {