Ignore:
Timestamp:
2018-08-11T16:10:32+02:00 (13 months ago)
Author:
Don-vip
Message:

see #15229 - deprecate all Main methods returning an URL

Location:
trunk/src/org/openstreetmap/josm/spi/preferences
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/spi/preferences/Config.java

    r12855 r14119  
    1212    private static IPreferences preferences;
    1313    private static IBaseDirectories baseDirectories;
     14    private static IUrls urls;
    1415
    1516    private Config() {
     
    3637
    3738    /**
     39     * Get class that provides the value of certain URLs
     40     * @return the global {@link IUrls} instance
     41     * @since 14119
     42     */
     43    public static IUrls getUrls() {
     44        return urls;
     45    }
     46
     47    /**
    3848     * Install the global preference instance.
    3949     * @param preferences the global preference instance to set (must not be null)
     
    5363        Config.baseDirectories = Objects.requireNonNull(baseDirectories, "baseDirectories");
    5464    }
     65
     66    /**
     67     * Install the global URLs provider.
     68     * @param urls the global URLs provider instance to set (must not be null)
     69     * @since xx
     70     */
     71    public static void setUrlsProvider(IUrls urls) {
     72        Config.urls = Objects.requireNonNull(urls, "urls");
     73    }
    5574}
Note: See TracChangeset for help on using the changeset viewer.