From dab3119d5f4ec8a80c3759d1903f0ac0ff2606d9 Mon Sep 17 00:00:00 2001 From: Patrick Plitzner
FilteredTaxonBaseSelectionDialog class.
- * - * @author n.hoffmann - * @created Sep 21, 2009 - * @version 1.0 - */ -public class TaxonBaseSelectionDialog extends AbstractFilteredCdmResourceSelectionDialogselect
- * - * @param shell a {@link org.eclipse.swt.widgets.Shell} object. - * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. - * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object. - */ - public static TaxonBase selectTaxonBase(Shell shell, ConversationHolder conversation) { - AbstractFilteredCdmResourceSelectionDialogselect
- * - * @param shell a {@link org.eclipse.swt.widgets.Shell} object. - * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. - * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object. - */ - public static Taxon selectTaxon(Shell shell, ConversationHolder conversation, Taxon taxonToBeFiltered) { - - - AbstractFilteredCdmResourceSelectionDialogselect
- * - * @param shell a {@link org.eclipse.swt.widgets.Shell} object. - * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. - * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object. - */ - public static Synonym selectSynonym(Shell shell, ConversationHolder conversation) { - AbstractFilteredCdmResourceSelectionDialogConstructor for FilteredTaxonBaseSelectionDialog.
- * - * @param shell a {@link org.eclipse.swt.widgets.Shell} object. - * @param title a {@link java.lang.String} object. - * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. - * @param multi a boolean. - * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object. - */ - protected TaxonBaseSelectionDialog(Class extends TaxonBase> clazz, Shell shell, ConversationHolder conversation, String title, boolean multi, TaxonBase taxon, TaxonBase taxonToBeFiltered) { - super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), taxon); - this.cdmBaseToBeFiltered = taxonToBeFiltered; - this.clazz = clazz; - initModel(); - } - - /* (non-Javadoc) - * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite) - */ - /** {@inheritDoc} */ - @Override - protected Control createExtendedContentArea(Composite parent) { - return null; - } - - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID) - */ - /** {@inheritDoc} */ - @Override - protected TaxonBase getPersistentObject(UUID uuid) { - return CdmStore.getService(ITaxonService.class).load(uuid); - } - - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel() - */ - /** {@inheritDoc} */ - @Override - protected void initModel() { - if(clazz == TaxonBase.class){ - model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCache(); - } - else if(clazz == Taxon.class){ - - model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheTaxon(); - - } - else if(clazz == Synonym.class){ - model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheSynonym(); - } - } - - /** {@inheritDoc} */ - @Override - protected AbstractNewEntityWizard getNewEntityWizard(String parameter) { - return null; - } - - /** {@inheritDoc} */ - @Override - protected String getNewWizardLinkText() { - return null; - } -} +// $Id$ +/** + * Copyright (C) 2007 EDIT + * European Distributed Institute of Taxonomy + * http://www.e-taxonomy.eu + * + * The contents of this file are subject to the Mozilla Public License Version 1.1 + * See LICENSE.TXT at the top of this package for the full license terms. + */ + +package eu.etaxonomy.taxeditor.ui.dialog.selection; + +import java.util.UUID; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; + +import eu.etaxonomy.cdm.api.conversation.ConversationHolder; +import eu.etaxonomy.cdm.api.service.ITaxonService; +import eu.etaxonomy.cdm.model.taxon.Synonym; +import eu.etaxonomy.cdm.model.taxon.Taxon; +import eu.etaxonomy.cdm.model.taxon.TaxonBase; +import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard; +import eu.etaxonomy.taxeditor.store.CdmStore; + +/** + * @author n.hoffmann + * @created Sep 21, 2009 + * @version 1.0 + */ +public class TaxonBaseSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog