-// $Id$
/**
* Copyright (C) 2014 EDIT
* European Distributed Institute of Taxonomy
import org.eclipse.swt.widgets.Shell;
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.service.molecular.IPrimerService;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.molecular.Primer;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
import eu.etaxonomy.taxeditor.newWizard.NewPrimerWizard;
import eu.etaxonomy.taxeditor.store.CdmStore;
public class PrimerSelectionDialog extends
AbstractFilteredCdmResourceSelectionDialog<Primer> {
- public static Primer select(Shell shell, ConversationHolder conversation, Primer primer){
- PrimerSelectionDialog dialog = new PrimerSelectionDialog(shell, conversation,
- "Choose Unit", false, PrimerSelectionDialog.class.getCanonicalName(), primer);
+ public static Primer select(Shell shell, //ConversationHolder conversation,
+ Primer primer){
+ PrimerSelectionDialog dialog = new PrimerSelectionDialog(shell, //conversation,
+ "Choose Primer", false, PrimerSelectionDialog.class.getCanonicalName(), primer);
return getSelectionFromDialog(dialog);
}
/**
* <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
*/
- protected PrimerSelectionDialog(Shell shell, ConversationHolder conversation, String title,
+ protected PrimerSelectionDialog(Shell shell, //ConversationHolder conversation,
+ String title,
boolean multi, String settings, Primer cdmObject) {
- super(shell, conversation, title, multi, settings, cdmObject);
+ super(shell, //conversation,
+ title, multi, settings, cdmObject);
}
/** {@inheritDoc} */
if(primer != null){
return primer;
}
- AbstractUtility.error(this.getClass(), "Selected unit is not a primer", null);
+ MessagingUtils.error(this.getClass(), "Selected element is not a primer", null);
return null;
}
/** {@inheritDoc} */
@Override
- protected void initModel() {
- model = CdmStore.getService(IPrimerService.class).getPrimerUuidAndTitleCache();
+ protected void callService(String pattern) {
+ model = CdmStore.getService(IPrimerService.class).getPrimerUuidAndTitleCache(limitOfInitialElements, pattern);
}
/* (non-Javadoc)
/** {@inheritDoc} */
@Override
- protected String getNewWizardLinkText() {
- return String.format("Create a new <a>%1s</a>", "Primer ");
+ protected String[] getNewWizardText() {
+ return new String[]{"New Primer"};
}
}