JAL-2316 Adjusted unit tests. Tidied UrlLinkProviderI interface.
[jalview.git] / src / jalview / urls / UrlProviderI.java
index 9ecb28a..0a02ca0 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.urls;
 
+import java.util.List;
 import java.util.Vector;
 
 /**
@@ -31,29 +32,22 @@ import java.util.Vector;
 public interface UrlProviderI
 {
 
-  /*
-   * Default sequence URL link label for EMBL-EBI search
-   */
-  public static final String DEFAULT_LABEL = "EMBL-EBI Search";
-
-  /*
-   * Default sequence URL link string for EMBL-EBI search
-   */
-  public static final String DEFAULT_STRING = DEFAULT_LABEL
-          + "|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$";
-
   /**
    * Get names and urls in as strings for display
    * 
    */
-  Vector<String> getLinksForDisplay();
+  Vector<String> getLinksForMenu();
 
   /**
-   * Get the id of the default URL
+   * Get names and urls as strings for display
    * 
-   * @return id of the default URL
    */
-  String getDefaultUrl();
+  List<UrlLinkDisplay> getLinksForTable();
+
+  /**
+   * Set names and urls from display settings
+   */
+  void setUrlData(List<UrlLinkDisplay> links);
 
   /**
    * Get the link for the default URL
@@ -88,19 +82,22 @@ public interface UrlProviderI
   String writeUrlsAsString();
 
   /**
-   * Set URL links from pair of collections
-   * 
-   * @param names
-   * @param urls
-   */
-  void setUrlLinks(Vector<String> names, Vector<String> urls)
-          throws IllegalArgumentException;
-
-  /**
    * Choose the default URL in the event of the selected default being
    * unavailable
    * 
    * @return id of chosen default url
    */
   String chooseDefaultUrl();
+
+  /**
+   * Determine if id is for a user-defined URL
+   */
+  boolean isUserEntry(String id);
+
+  /**
+   * Get list of column names to display in UI
+   * 
+   * @return column names
+   */
+  List<String> getDisplayColumnNames();
 }