JAL-2316 More unit testing and adjustments
[jalview.git] / src / jalview / urls / UrlProviderI.java
index 595f98d..de52391 100644 (file)
@@ -33,7 +33,7 @@ public interface UrlProviderI
 {
 
   /**
-   * Get names and urls in as strings for display
+   * Get names and urls in the UrlProvider as strings for display
    * 
    */
   Vector<String> getLinksForMenu();
@@ -65,7 +65,7 @@ public interface UrlProviderI
   String getDefaultUrlId();
 
   /**
-   * Get the target of thelink for the default URL
+   * Get the target of the link for the default URL
    * 
    * @seqid sequence id for which to build link
    * @return target of link for the default URL
@@ -77,9 +77,20 @@ public interface UrlProviderI
    * 
    * @param id
    *          the id of the URL to set as default
-   * @return true if setting was successful, false otherwise
+   * @return true if setting is successful
+   * @throws IllegalArgumentException
+   *           if id does not exist as a url in the UrlProvider
    */
-  boolean setDefaultUrl(String id);
+  boolean setDefaultUrl(String id) throws IllegalArgumentException;
+
+  /**
+   * Test if UrlProvider contains a url
+   * 
+   * @param id
+   *          to test for
+   * @return true of UrlProvider contains this id, false otherwise
+   */
+  boolean contains(String id);
 
   /**
    * Write out all URLs as a string suitable for serialising