edu.mayo.bsi.ngsportal.client
Class DBLookupSuggestOracle

java.lang.Object
  extended by com.google.gwt.user.client.ui.SuggestOracle
      extended by com.google.gwt.user.client.ui.MultiWordSuggestOracle
          extended by edu.mayo.bsi.ngsportal.client.DBLookupSuggestOracle
All Implemented Interfaces:
com.google.gwt.user.client.rpc.AsyncCallback<List<String>>

public class DBLookupSuggestOracle
extends com.google.gwt.user.client.ui.MultiWordSuggestOracle
implements com.google.gwt.user.client.rpc.AsyncCallback<List<String>>

Author:
Greg Dougherty

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.MultiWordSuggestOracle
com.google.gwt.user.client.ui.MultiWordSuggestOracle.MultiWordSuggestion
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.SuggestOracle
com.google.gwt.user.client.ui.SuggestOracle.Callback, com.google.gwt.user.client.ui.SuggestOracle.Request, com.google.gwt.user.client.ui.SuggestOracle.Response, com.google.gwt.user.client.ui.SuggestOracle.Suggestion
 
Constructor Summary
DBLookupSuggestOracle(NGSPortal caller)
           
 
Method Summary
 Set<String> getAllowedStrings()
          Get all the strings that the Oracle will accept
 boolean isAllowed(String test)
          Verifies if a String is an allowed suggestion.
 void onFailure(Throwable caught)
           
 void onSuccess(List<String> result)
           
 
Methods inherited from class com.google.gwt.user.client.ui.MultiWordSuggestOracle
add, addAll, clear, isDisplayStringHTML, requestDefaultSuggestions, requestSuggestions, setDefaultSuggestions, setDefaultSuggestionsFromText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBLookupSuggestOracle

public DBLookupSuggestOracle(NGSPortal caller)
Parameters:
caller -
Method Detail

isAllowed

public boolean isAllowed(String test)
Verifies if a String is an allowed suggestion.

Parameters:
test - String to verify
Returns:
True if the String is one of the Strings this Oracle suggests, else false

getAllowedStrings

public Set<String> getAllowedStrings()
Get all the strings that the Oracle will accept

Returns:
Set of Strings, could be empty, won't be null

onFailure

public void onFailure(Throwable caught)
Specified by:
onFailure in interface com.google.gwt.user.client.rpc.AsyncCallback<List<String>>

onSuccess

public void onSuccess(List<String> result)
Specified by:
onSuccess in interface com.google.gwt.user.client.rpc.AsyncCallback<List<String>>