Class MagellanUrl


  • public class MagellanUrl
    extends java.lang.Object
    Utility class maintaining important URLs for Magellan.
    Author:
    stm
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String MAGELLAN_LOCATIONS_URL
      This URL should point to a file containing all other URLs (in properties file format:
      key1 = value1
      key2 = value2
      # ....
      static java.lang.String VERSION_NIGHTLY
      Key for nightly version
      static java.lang.String VERSION_RELEASE
      Key for stable version
      static java.lang.String WWW_BUGS
      Key for Magellan bugtracker URL
      static java.lang.String WWW_DOWNLOAD
      Key for download URL
      static java.lang.String WWW_FILES
      Key for files URL
      static java.lang.String WWW_ROOT
      Key for basic Magellan URL
    • Constructor Summary

      Constructors 
      Constructor Description
      MagellanUrl()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getMagellanUrl​(java.lang.String key)
      Returns a URL, if possible fetched from the remote file at MAGELLAN_LOCATIONS_URL.
      static java.lang.String getRootUrl()
      Returns Magellan's primary WWW URL.
      static void retrieveLocations​(java.util.Properties properties)
      Tries to access the locations file remotely and read the values.
      static void retrieveLocations​(java.util.Properties properties, boolean force)
      Tries to access the locations file remotely and read the values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAGELLAN_LOCATIONS_URL

        public static final java.lang.String MAGELLAN_LOCATIONS_URL
        This URL should point to a file containing all other URLs (in properties file format:
        key1 = value1
        key2 = value2
        # ....
        See Also:
        Constant Field Values
      • WWW_ROOT

        public static final java.lang.String WWW_ROOT
        Key for basic Magellan URL
        See Also:
        Constant Field Values
      • WWW_BUGS

        public static final java.lang.String WWW_BUGS
        Key for Magellan bugtracker URL
        See Also:
        Constant Field Values
      • VERSION_NIGHTLY

        public static final java.lang.String VERSION_NIGHTLY
        Key for nightly version
        See Also:
        Constant Field Values
      • VERSION_RELEASE

        public static final java.lang.String VERSION_RELEASE
        Key for stable version
        See Also:
        Constant Field Values
      • WWW_DOWNLOAD

        public static final java.lang.String WWW_DOWNLOAD
        Key for download URL
        See Also:
        Constant Field Values
      • WWW_FILES

        public static final java.lang.String WWW_FILES
        Key for files URL
        See Also:
        Constant Field Values
    • Constructor Detail

      • MagellanUrl

        public MagellanUrl()
    • Method Detail

      • getMagellanUrl

        public static java.lang.String getMagellanUrl​(java.lang.String key)
        Returns a URL, if possible fetched from the remote file at MAGELLAN_LOCATIONS_URL. Current url keys include "www.root", "www.bugtracker", "www.download", "version.release", "version.nightly".
        Parameters:
        key -
        Returns:
        The url for the key, null if it could not be found and isn't one of the default values.
      • retrieveLocations

        public static void retrieveLocations​(java.util.Properties properties)
        Tries to access the locations file remotely and read the values.
        Parameters:
        properties - Client settings, see HTTPClient(Properties)
        See Also:
        HTTPClient
      • retrieveLocations

        public static void retrieveLocations​(java.util.Properties properties,
                                             boolean force)
        Tries to access the locations file remotely and read the values.
        Parameters:
        properties - Client settings, see HTTPClient(Properties)
        force - If this is true, the timeout is ignored.
        See Also:
        HTTPClient
      • getRootUrl

        public static java.lang.String getRootUrl()
        Returns Magellan's primary WWW URL.