// $Id$
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* 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.
*/
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.service.IReferenceService;
import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.cdm.strategy.cache.reference.ReferenceBaseDefaultCacheStrategy;
+import eu.etaxonomy.cdm.strategy.cache.reference.ReferenceDefaultCacheStrategy;
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
import eu.etaxonomy.taxeditor.newWizard.NewReferenceWizard;
import eu.etaxonomy.taxeditor.store.CdmStore;
* @version 1.0
*/
public class ReferenceSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<Reference> {
-
+
/**
* <p>select</p>
*
*/
public static Reference select(Shell shell, ConversationHolder conversation, Reference reference) {
ReferenceSelectionDialog dialog = new ReferenceSelectionDialog(shell, conversation,
- "Choose a reference", false, (Reference) reference);
+ "Choose a reference", false, reference);
return getSelectionFromDialog(dialog);
}
-
+
/**
* <p>Constructor for FilteredReferenceSelectionDialog.</p>
*
protected ReferenceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, Reference reference) {
super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), null);
}
-
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
*/
/** {@inheritDoc} */
@Override
- protected void initModel() {
+ protected void initModel() {
model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache();
}
-
+
/** {@inheritDoc} */
@Override
}else if(cdmObject.getAuthorTeam() == null){
return super.getTitle(cdmObject);
}else{
- return ReferenceBaseDefaultCacheStrategy.putAuthorToEndOfString(cdmObject.getTitleCache(), cdmObject.getAuthorTeam().getTitleCache());
+ return ReferenceDefaultCacheStrategy.putAuthorToEndOfString(cdmObject.getTitleCache(), cdmObject.getAuthorTeam().getTitleCache());
}
}
-
+
/** {@inheritDoc} */
@Override
protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
protected String getNewWizardLinkText() {
return "Click <A>here</A> to create a new reference.";
}
-
+
}