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;
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);
}
/**
* <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);
}
/**
* {@inheritDoc}
*/
@Override
- protected String getNewWizardLinkText() {
- // TODO Auto-generated method stub
+ protected String[] getNewWizardText() {
return null;
}
* {@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);
}
}