-/**
-* Copyright (C) 2009 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 org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.cdm.model.agent.AgentBase;
-import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
-import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
-import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.cdm.model.location.Country;
-import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.cdm.model.media.Media;
-import eu.etaxonomy.cdm.model.media.Rights;
-import eu.etaxonomy.cdm.model.molecular.Amplification;
-import eu.etaxonomy.cdm.model.molecular.Primer;
-import eu.etaxonomy.cdm.model.name.TaxonName;
-import eu.etaxonomy.cdm.model.occurrence.Collection;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
-import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.cdm.model.term.FeatureTree;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.section.agent.TeamMemberElement;
-import eu.etaxonomy.taxeditor.ui.section.description.CommonNameSourceElement;
-import eu.etaxonomy.taxeditor.ui.section.description.detail.CommonNameDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
-
-/**
- * @author n.hoffmann
- * @date Jan 25, 2012
- *
- */
-public class SelectionDialogFactory {
-
- public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, //ConversationHolder conversation,
- T currentSelection){
- return getSelectionFromDialog(clazz, shell, //conversation,
- currentSelection, null);
- }
-
- public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, //ConversationHolder conversation,
- T currentSelection, ICdmFormElement parentElement){
-
- if(clazz.equals(Taxon.class)){
- return (T) TaxonSelectionDialog.selectTaxon(shell, //conversation,
- (Taxon) currentSelection);
- }
- if(clazz.equals(Synonym.class)){
- return (T) TaxonBaseSelectionDialog.selectSynonym(shell );//,conversation);
- }
- if(clazz.equals(TaxonBase.class)){
- return (T) TaxonBaseSelectionDialog.selectTaxonBase(shell);//, conversation);
- }
- if(clazz.equals(Classification.class)){
- return (T) ClassificationSelectionDialog.select(shell, //conversation,
- (Classification) currentSelection);
- }
- if(clazz.equals(TaxonNode.class)){
- return (T) TaxonNodeSelectionDialog.select(shell, //conversation,
- null, null, (TaxonNode) currentSelection, ((TaxonNode) currentSelection).getClassification().getUuid());
- }
- if(clazz.equals(Reference.class) && parentElement instanceof NomenclaturalReferenceDetailElement){
- return (T) NomenclaturalReferenceSelectionDialog.select(shell, //conversation,
- (Reference) currentSelection, ((NomenclaturalReferenceDetailElement)parentElement).getEntity().getCombinationAuthorship());
- }
- if(clazz.equals(Reference.class) && parentElement instanceof CommonNameSourceElement && PreferencesUtil.getFilterCommonNameReferences()){
- return (T) CommonNameReferenceSelectionDialog.select(shell, //conversation,
- (Reference) currentSelection);
- }
- if(clazz.equals(Reference.class)){
- if (parentElement instanceof ReferenceDetailElement){
- return (T) ReferenceSelectionDialog.select(shell, //conversation,
- ((ReferenceDetailElement) parentElement).getEntity(), true);
- }
- return (T) ReferenceSelectionDialog.select(shell, //conversation,
- (Reference) currentSelection);
- }
-
- if(clazz.equals(TaxonName.class)){
- return (T) NameSelectionDialog.select(shell, //conversation,
- (TaxonName) currentSelection);
- }
- if(clazz.equals(Team.class)){
- return (T) TeamSelectionDialog.select(shell, //conversation,
- (Team) currentSelection);
- }
- if(clazz.equals(TeamOrPersonBase.class) && parentElement instanceof AuthorshipDetailElement){
- return (T) NomenclaturalAuthorSelectionDialog.select(shell, //conversation,
- (TeamOrPersonBase) currentSelection, false);
- }else if(clazz.equals(TeamOrPersonBase.class)){
- //TODO: add TeamOrPersonBaseSelectionDialog (see ticket #4545)
- return (T) TeamOrPersonBaseSelectionDialog.select(shell, //conversation,
- (TeamOrPersonBase) currentSelection, false);
- }
- if(clazz.equals(Person.class) && parentElement instanceof TeamMemberElement){
- return (T) NomenclaturalPersonAuthorSelectionDialog.select(shell, //conversation,
- (TeamOrPersonBase) currentSelection, true);
- }
- if(clazz.equals(AgentBase.class)){
- return (T) AgentSelectionDialog.select(shell, //conversation,
- (AgentBase) currentSelection, false);
- }
- if(clazz.equals(Feature.class)){
- return (T) FeatureSelectionDialog.select(shell, //conversation,
- (Feature) currentSelection);
- }
- if(clazz.equals(FeatureTree.class)){
- return (T) FeatureTreeSelectionDialog.select(shell, //conversation,
- (FeatureTree) currentSelection);
- }
- if(clazz.equals(PolytomousKey.class)){
- return (T) PolytomousKeySelectionDialog.select(shell, //conversation,
- (PolytomousKey) currentSelection);
- }
- if(clazz.equals(PolytomousKeyNode.class)){
- MessagingUtils.warningDialog("Not implemented yet", SelectionDialogFactory.class,
- "This functionality is not implemented yet.");
- return null;
- }
- if(clazz.equals(DerivedUnit.class)){
- return (T) DerivedUnitSelectionDialog.select(shell, //conversation,
- (DerivedUnit) currentSelection);
- }
- if(clazz.equals(FieldUnit.class)){
- return (T) FieldUnitSelectionDialog.select(shell, //conversation,
- (FieldUnit) currentSelection);
- }
- if(clazz.equals(SpecimenOrObservationBase.class)){
- return (T) SpecimenOrObservationBaseSelectionDialog.select(shell, //conversation,
- (SpecimenOrObservationBase) currentSelection);
- }
- if(clazz.equals(NamedArea.class)){
- if(parentElement instanceof IEntityElement && ((IEntityElement) parentElement).getEntity() instanceof DerivedUnitFacade){
- return (T) NamedAreaSelectionDialog.select(shell, //conversation,
- (NamedArea) currentSelection, DerivedUnit.class.getCanonicalName(), Country.uuidCountryVocabulary);
- }
- else if(parentElement instanceof CommonNameDetailElement ){
- return (T) CommonNameNamedAreaSelectionDialog.select(shell, //conversation,
- (NamedArea) currentSelection, parentElement.getClass().getCanonicalName());
- }
- else{
- return (T) NamedAreaSelectionDialog.select(shell, //conversation,
- (NamedArea) currentSelection, parentElement.getClass().getCanonicalName());
- }
- }
- if(clazz.equals(Collection.class)){
- return (T) CollectionSelectionDialog.select(shell, //conversation,
- (Collection) currentSelection);
- }
- if(clazz.equals(User.class) && parentElement instanceof MemberDetailElement){
- MemberDetailSection section = (MemberDetailSection)((MemberDetailElement)parentElement).getParentElement();
- return (T) UserSelectionDialog.select(shell, //conversation,
- (User) currentSelection, section.getEntity());
- }
- if(clazz.equals(GrantedAuthorityImpl.class)){
- return (T) GrantedAuthoritySelectionDialog.select(shell, //conversation,
- (GrantedAuthorityImpl) currentSelection);
- }
- if (clazz.equals(Person.class)){
- return (T) PersonSelectionDialog.select(shell, //conversation,
- (Person) currentSelection);
- }
- if(clazz.equals(Group.class) && parentElement instanceof GroupsByUserDetailElement){
- GroupsByUserDetailSection section =(GroupsByUserDetailSection)((GroupsByUserDetailElement)parentElement).getParentElement();
- return (T) GroupSelectionDialog.select(shell, //conversation,
- (Group) currentSelection, section.getEntity());
- }
- if(clazz.equals(Institution.class)){
- return (T) InstitutionSelectionDialog.select(shell, //conversation,
- (Institution) currentSelection);
- }
- if(clazz.equals(Primer.class)){
- return (T) PrimerSelectionDialog.select(shell, //conversation,
- (Primer) currentSelection);
- }
- if(clazz.equals(Amplification.class)){
- return (T) AmplificationSelectionDialog.select(shell, //conversation,
- (Amplification) currentSelection);
- }
- if(clazz.equals(Media.class)){
- return (T) MediaSelectionDialog.select(shell, //conversation,
- (Media) currentSelection);
- }
- if(clazz.equals(Rights.class)){
- return (T) RightsSelectionDialog.select(shell, //conversation,
- (Rights) currentSelection);
- }
-
- return null;
- }
-
- public static <T extends ICdmBase> T getSelectionFromExtDialog(Class<T> clazz, Shell shell, //ConversationHolder conversation,
- ICdmFormElement parentElement){
- return (T) ExtReferenceSelectionDialog.select(shell, //conversation,
- null);
- }
-
-
-}
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy\r
+* http://www.e-taxonomy.eu\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.ui.dialog.selection;\r
+\r
+import java.util.List;\r
+import java.util.UUID;\r
+\r
+import org.eclipse.swt.widgets.Shell;\r
+\r
+import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;\r
+import eu.etaxonomy.cdm.model.agent.AgentBase;\r
+import eu.etaxonomy.cdm.model.agent.Institution;\r
+import eu.etaxonomy.cdm.model.agent.Person;\r
+import eu.etaxonomy.cdm.model.agent.Team;\r
+import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;\r
+import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;\r
+import eu.etaxonomy.cdm.model.common.Group;\r
+import eu.etaxonomy.cdm.model.common.ICdmBase;\r
+import eu.etaxonomy.cdm.model.common.User;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.PolytomousKey;\r
+import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;\r
+import eu.etaxonomy.cdm.model.location.Country;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.cdm.model.media.Media;\r
+import eu.etaxonomy.cdm.model.media.Rights;\r
+import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;\r
+import eu.etaxonomy.cdm.model.molecular.Amplification;\r
+import eu.etaxonomy.cdm.model.molecular.Primer;\r
+import eu.etaxonomy.cdm.model.name.TaxonName;\r
+import eu.etaxonomy.cdm.model.occurrence.Collection;\r
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;\r
+import eu.etaxonomy.cdm.model.occurrence.FieldUnit;\r
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;\r
+import eu.etaxonomy.cdm.model.reference.Reference;\r
+import eu.etaxonomy.cdm.model.taxon.Classification;\r
+import eu.etaxonomy.cdm.model.taxon.Synonym;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
+import eu.etaxonomy.cdm.model.term.FeatureTree;\r
+import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;\r
+import eu.etaxonomy.taxeditor.ui.section.agent.TeamMemberElement;\r
+import eu.etaxonomy.taxeditor.ui.section.description.CommonNameSourceElement;\r
+import eu.etaxonomy.taxeditor.ui.section.description.detail.CommonNameDetailElement;\r
+import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailElement;\r
+import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;\r
+import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailElement;\r
+import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailElement;\r
+import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;\r
+import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailElement;\r
+import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;\r
+\r
+/**\r
+ * @author n.hoffmann\r
+ * @date Jan 25, 2012\r
+ *\r
+ */\r
+public class SelectionDialogFactory {\r
+\r
+ public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, //ConversationHolder conversation,\r
+ T currentSelection){\r
+ return getSelectionFromDialog(clazz, shell, //conversation,\r
+ currentSelection, null);\r
+ }\r
+\r
+ public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, //ConversationHolder conversation,\r
+ T currentSelection, ICdmFormElement parentElement){\r
+\r
+ if(clazz.equals(Taxon.class)){\r
+ return (T) TaxonSelectionDialog.selectTaxon(shell, //conversation,\r
+ (Taxon) currentSelection);\r
+ }\r
+ if(clazz.equals(Synonym.class)){\r
+ return (T) TaxonBaseSelectionDialog.selectSynonym(shell );//,conversation);\r
+ }\r
+ if(clazz.equals(TaxonBase.class)){\r
+ return (T) TaxonBaseSelectionDialog.selectTaxonBase(shell);//, conversation);\r
+ }\r
+ if(clazz.equals(Classification.class)){\r
+ return (T) ClassificationSelectionDialog.select(shell, //conversation,\r
+ (Classification) currentSelection);\r
+ }\r
+ if(clazz.equals(TaxonNode.class)){\r
+ return (T) TaxonNodeSelectionDialog.select(shell, //conversation,\r
+ null, null, (TaxonNode) currentSelection, ((TaxonNode) currentSelection).getClassification().getUuid());\r
+ }\r
+ if(clazz.equals(Reference.class) && parentElement instanceof NomenclaturalReferenceDetailElement){\r
+ return (T) NomenclaturalReferenceSelectionDialog.select(shell, //conversation,\r
+ (Reference) currentSelection, ((NomenclaturalReferenceDetailElement)parentElement).getEntity().getCombinationAuthorship());\r
+ }\r
+ if(clazz.equals(Reference.class) && parentElement instanceof CommonNameSourceElement && PreferencesUtil.getFilterCommonNameReferences()){\r
+ return (T) CommonNameReferenceSelectionDialog.select(shell, //conversation,\r
+ (Reference) currentSelection);\r
+ }\r
+ if(clazz.equals(Reference.class)){\r
+ if (parentElement instanceof ReferenceDetailElement){\r
+ return (T) ReferenceSelectionDialog.select(shell, //conversation,\r
+ ((ReferenceDetailElement) parentElement).getEntity(), true);\r
+ }\r
+ return (T) ReferenceSelectionDialog.select(shell, //conversation,\r
+ (Reference) currentSelection);\r
+ }\r
+\r
+ if(clazz.equals(TaxonName.class)){\r
+ return (T) NameSelectionDialog.select(shell, //conversation,\r
+ (TaxonName) currentSelection);\r
+ }\r
+ if(clazz.equals(Team.class)){\r
+ return (T) TeamSelectionDialog.select(shell, //conversation,\r
+ (Team) currentSelection);\r
+ }\r
+ if(clazz.equals(TeamOrPersonBase.class) && parentElement instanceof AuthorshipDetailElement){\r
+ return (T) NomenclaturalAuthorSelectionDialog.select(shell, //conversation,\r
+ (TeamOrPersonBase) currentSelection, false);\r
+ }else if(clazz.equals(TeamOrPersonBase.class)){\r
+ //TODO: add TeamOrPersonBaseSelectionDialog (see ticket #4545)\r
+ return (T) TeamOrPersonBaseSelectionDialog.select(shell, //conversation,\r
+ (TeamOrPersonBase) currentSelection, false);\r
+ }\r
+ if(clazz.equals(Person.class) && parentElement instanceof TeamMemberElement){\r
+ return (T) NomenclaturalPersonAuthorSelectionDialog.select(shell, //conversation,\r
+ (TeamOrPersonBase) currentSelection, true);\r
+ }\r
+ if(clazz.equals(AgentBase.class)){\r
+ return (T) AgentSelectionDialog.select(shell, //conversation,\r
+ (AgentBase) currentSelection, false);\r
+ }\r
+ if(clazz.equals(Feature.class)){\r
+ return (T) FeatureSelectionDialog.select(shell, //conversation,\r
+ (Feature) currentSelection);\r
+ }\r
+ if(clazz.equals(FeatureTree.class)){\r
+ return (T) FeatureTreeSelectionDialog.select(shell, //conversation,\r
+ (FeatureTree) currentSelection);\r
+ }\r
+ if(clazz.equals(PolytomousKey.class)){\r
+ return (T) PolytomousKeySelectionDialog.select(shell, //conversation,\r
+ (PolytomousKey) currentSelection);\r
+ }\r
+ if(clazz.equals(PolytomousKeyNode.class)){\r
+ MessagingUtils.warningDialog("Not implemented yet", SelectionDialogFactory.class,\r
+ "This functionality is not implemented yet.");\r
+ return null;\r
+ }\r
+ if(clazz.equals(DerivedUnit.class)){\r
+ return (T) DerivedUnitSelectionDialog.select(shell, //conversation,\r
+ (DerivedUnit) currentSelection);\r
+ }\r
+ if(clazz.equals(FieldUnit.class)){\r
+ return (T) FieldUnitSelectionDialog.select(shell, //conversation,\r
+ (FieldUnit) currentSelection);\r
+ }\r
+ if(clazz.equals(SpecimenOrObservationBase.class)){\r
+ return (T) SpecimenOrObservationBaseSelectionDialog.select(shell, //conversation,\r
+ (SpecimenOrObservationBase) currentSelection);\r
+ }\r
+ if(clazz.equals(NamedArea.class)){\r
+ if(parentElement instanceof IEntityElement && ((IEntityElement) parentElement).getEntity() instanceof DerivedUnitFacade){\r
+ return (T) NamedAreaSelectionDialog.select(shell, //conversation,\r
+ (NamedArea) currentSelection, DerivedUnit.class.getCanonicalName(), Country.uuidCountryVocabulary);\r
+ }\r
+ else if(parentElement instanceof CommonNameDetailElement ){\r
+ return (T) CommonNameNamedAreaSelectionDialog.select(shell, //conversation,\r
+ (NamedArea) currentSelection, parentElement.getClass().getCanonicalName());\r
+ }\r
+ else{\r
+ //if (parentElement == null){\r
+ List<UUID> uuidList = PreferencesUtil.createUUIDListFromStringPref(PreferencePredicate.AvailableDistributionAreaVocabularies.getKey());\r
+ UUID[] uuidArray = new UUID[uuidList.size()];\r
+ uuidList.toArray(uuidArray);\r
+ return (T)NamedAreaSelectionDialog.select(shell, (NamedArea) currentSelection, null, uuidArray);\r
+ //}\r
+ //return (T) NamedAreaSelectionDialog.select(shell, //conversation,\r
+ // (NamedArea) currentSelection, parentElement.getClass().getCanonicalName());\r
+ }\r
+ }\r
+ if(clazz.equals(Collection.class)){\r
+ return (T) CollectionSelectionDialog.select(shell, //conversation,\r
+ (Collection) currentSelection);\r
+ }\r
+ if(clazz.equals(User.class) && parentElement instanceof MemberDetailElement){\r
+ MemberDetailSection section = (MemberDetailSection)((MemberDetailElement)parentElement).getParentElement();\r
+ return (T) UserSelectionDialog.select(shell, //conversation,\r
+ (User) currentSelection, section.getEntity());\r
+ }\r
+ if(clazz.equals(GrantedAuthorityImpl.class)){\r
+ return (T) GrantedAuthoritySelectionDialog.select(shell, //conversation,\r
+ (GrantedAuthorityImpl) currentSelection);\r
+ }\r
+ if (clazz.equals(Person.class)){\r
+ return (T) PersonSelectionDialog.select(shell, //conversation,\r
+ (Person) currentSelection);\r
+ }\r
+ if(clazz.equals(Group.class) && parentElement instanceof GroupsByUserDetailElement){\r
+ GroupsByUserDetailSection section =(GroupsByUserDetailSection)((GroupsByUserDetailElement)parentElement).getParentElement();\r
+ return (T) GroupSelectionDialog.select(shell, //conversation,\r
+ (Group) currentSelection, section.getEntity());\r
+ }\r
+ if(clazz.equals(Institution.class)){\r
+ return (T) InstitutionSelectionDialog.select(shell, //conversation,\r
+ (Institution) currentSelection);\r
+ }\r
+ if(clazz.equals(Primer.class)){\r
+ return (T) PrimerSelectionDialog.select(shell, //conversation,\r
+ (Primer) currentSelection);\r
+ }\r
+ if(clazz.equals(Amplification.class)){\r
+ return (T) AmplificationSelectionDialog.select(shell, //conversation,\r
+ (Amplification) currentSelection);\r
+ }\r
+ if(clazz.equals(Media.class)){\r
+ return (T) MediaSelectionDialog.select(shell, //conversation,\r
+ (Media) currentSelection);\r
+ }\r
+ if(clazz.equals(Rights.class)){\r
+ return (T) RightsSelectionDialog.select(shell, //conversation,\r
+ (Rights) currentSelection);\r
+ }\r
+\r
+ return null;\r
+ }\r
+\r
+ public static <T extends ICdmBase> T getSelectionFromExtDialog(Class<T> clazz, Shell shell, //ConversationHolder conversation,\r
+ ICdmFormElement parentElement){\r
+ return (T) ExtReferenceSelectionDialog.select(shell, //conversation,\r
+ null);\r
+ }\r
+\r
+\r
+}\r