Url links changes - incomplete checkin as battery low
[jalview.git] / src / jalview / util / UrlProviderI.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.util;
22
23 import java.util.HashMap;
24 import java.util.Vector;
25
26 /**
27  * Methods for providing consistent access to up-to-date URLs
28  * 
29  * @author $author$
30  * @version $Revision$
31  */
32 public interface UrlProviderI
33 {
34   /**
35    * Get all the URL links
36    * 
37    * @return all URL links
38    */
39   public HashMap<String, UrlLink> getUrlLinks();
40
41   /**
42    * Get names and urls in as strings for display
43    * 
44    * @param nameLinks
45    * @param urlLinks
46    */
47   public void getLinksForDisplay(Vector<String> nameLinks,
48           Vector<String> urlLinks);
49
50   /**
51    * Get the default URL
52    * 
53    * @return id of the default URL
54    */
55   public String getDefaultUrl();
56
57   /**
58    * Set the default URL
59    * 
60    * @param id
61    *          the id of the URL to set as default
62    */
63   public void setDefaultUrl(String id);
64
65   /**
66    * Write out all URLs as a string suitable for serialising
67    * 
68    * @return string representation of available URLs
69    */
70   public String writeUrlsAsString();
71
72   /**
73    * Set URL links from string
74    * 
75    * @param cachedUrl
76    *          string representation of URL links, i.e. | separated
77    */
78   public void setUrlLinks(String cachedUrl);
79
80   /**
81    * Set URL links from collection
82    * 
83    * @param links
84    *          hashmap containing string indexed UrlLinks
85    */
86   public void setUrlLinks(HashMap<String, UrlLink> links);
87 }