fix #8034: preselected references should have correct type
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / dialog / selection / RightsSelectionDialog.java
old mode 100755 (executable)
new mode 100644 (file)
index 1198a7a..e4995d8
@@ -10,11 +10,8 @@ package eu.etaxonomy.taxeditor.ui.dialog.selection;
 
 import java.util.UUID;
 
-import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
 
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IRightsService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.media.Rights;
@@ -30,8 +27,9 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class RightsSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<Rights> {
 
 
-    public static Rights select(Shell shell, ConversationHolder conversation, Rights rights){
-        RightsSelectionDialog dialog = new RightsSelectionDialog(shell, conversation,
+    public static Rights select(Shell shell, //ConversationHolder conversation,
+            Rights rights){
+        RightsSelectionDialog dialog = new RightsSelectionDialog(shell, //conversation,
                 "Choose Rights", false, RightsSelectionDialog.class.getCanonicalName(), rights);
         return getSelectionFromDialog(dialog);
     }
@@ -39,9 +37,11 @@ public class RightsSelectionDialog extends AbstractFilteredCdmResourceSelectionD
     /**
      * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
      */
-    protected RightsSelectionDialog(Shell shell, ConversationHolder conversation, String title,
+    protected RightsSelectionDialog(Shell shell, //ConversationHolder conversation,
+            String title,
             boolean multi, String settings, Rights rights) {
-        super(shell, conversation, title, multi, settings, rights);
+        super(shell, //conversation,
+                title, multi, settings, rights);
     }
 
     /**
@@ -64,8 +64,7 @@ public class RightsSelectionDialog extends AbstractFilteredCdmResourceSelectionD
      * {@inheritDoc}
      */
     @Override
-    protected String getNewWizardLinkText() {
-        // TODO Auto-generated method stub
+    protected String[] getNewWizardText() {
         return null;
     }
 
@@ -82,22 +81,8 @@ public class RightsSelectionDialog extends AbstractFilteredCdmResourceSelectionD
      * {@inheritDoc}
      */
     @Override
-    protected void search() {
-        Control control =getSearchField();
-        String pattern = null;
-        if (control != null){
-            pattern = ((Text)control).getText();
-        }
-
-        if (pattern == null || pattern.equals("?")){
-            model = CdmStore.getService(IRightsService.class).getUuidAndLabelText(null,null);
-
-        }else{
-
-                model = CdmStore.getService(IRightsService.class).getUuidAndLabelText(limitOfInitialElements,pattern);
-
-        }
-
+    protected void callService(String pattern) {
+        model = CdmStore.getService(IRightsService.class).getUuidAndLabelText(limitOfInitialElements,pattern);
     }
 
 }