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
.editor
.view
.descriptive
;
13 import java
.util
.UUID
;
15 import eu
.etaxonomy
.cdm
.api
.service
.IDescriptionService
;
16 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
17 import eu
.etaxonomy
.taxeditor
.model
.CdmObjectTransfer
;
18 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
22 * @created Feb 8, 2011
25 public class DescriptionElementTransfer
extends CdmObjectTransfer
<DescriptionElementBase
> {
27 private static DescriptionElementTransfer instance
= new DescriptionElementTransfer();
28 private static final String TYPE_NAME
= "descriptionElement-transfer-format";
29 private static final int TYPEID
= registerType(TYPE_NAME
);
31 public static synchronized DescriptionElementTransfer
getInstance(){
35 private DescriptionElementTransfer(){}
38 * @see org.eclipse.swt.dnd.Transfer#getTypeIds()
41 protected int[] getTypeIds() {
42 return new int[] { TYPEID
};
46 * @see org.eclipse.swt.dnd.Transfer#getTypeNames()
49 protected String
[] getTypeNames() {
50 return new String
[] { TYPE_NAME
};
54 * @see eu.etaxonomy.taxeditor.model.CdmObjectTransfer#loadElement(java.util.UUID)
57 public DescriptionElementBase
loadElement(UUID uuid
) {
58 return CdmStore
.getService(IDescriptionService
.class).loadDescriptionElement(uuid
, null);