/*
* Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
* Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Jalview. If not, see .
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.urls;
import java.util.List;
import java.util.Vector;
/**
* Methods for providing consistent access to up-to-date URLs
*
* @author $author$
* @version $Revision$
*/
public interface UrlProviderI
{
/**
* Get names and urls in as strings for display
*
*/
Vector getLinksForMenu();
/**
* Get names and urls as strings for display
*
*/
List getLinksForTable();
/**
* Set names and urls from display settings
*/
void setUrlData(List links);
/**
* Get the link for the default URL
*
* @seqid sequence id for which to build link
* @return link for the default URL
*/
String getDefaultUrl(String seqid);
/**
* Get the target of thelink for the default URL
*
* @seqid sequence id for which to build link
* @return target of link for the default URL
*/
String getDefaultTarget(String seqid);
/**
* Set the default URL
*
* @param id
* the id of the URL to set as default
* @return true if setting was successful, false otherwise
*/
boolean setDefaultUrl(String id);
/**
* Write out all URLs as a string suitable for serialising
*
* @return string representation of available URLs
*/
String writeUrlsAsString();
/**
* 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);
}