/*
 * This code is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public 
 * License as published by the Free Software Foundation; either 
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This code 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public 
 * License along with this program; if not, write to the Free 
 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 
 * MA  02111-1307, USA.
 */
package no.geosoft.cc.currency;



import java.util.Currency;
import java.util.Collection;
import java.util.Date;



/**
 * Interface for entities acting as a currency srver.
 * 
 * @author <a href="mailto:info@geosoft.no">GeoSoft</a>
 */   
public interface CurrencyServer
{
  /**
   * Get name of this currency server.
   * 
   * @return  Name of this currency server.
   */
  String getName();
  

  /**
   * Get URL of this currency server.
   * 
   * @return  URL of this currency server.
   */
  String getUrl();
  
  
  /**
   * Return all currencies supported by this server.
   * 
   * @return Collection of currencies (java.util.Currency)
   */
  Collection getCurrencies();


  
  /**
   * Return a specfic currency (or null if this currency
   * is not supported).
   * 
   * @param isoCode  ISO code of the currency to get.
   * @return         Requested currency.
   */
  Currency getCurrency (String isoCode);


  /**
   * Get exchange rate between this currency and the base
   * currency (US$)
   * 
   * @param currency  Currency to get exchange rate for.
   * @return          Exchange rate between this currency and US$
   */
  double getExchangeRate (Currency currency);


    
  /**
   * Get date of exchange rate information.
   * 
   * @return  Date of exchange rate information.
   */
  Date getDate();
}