Ignore:
Timestamp:
2017-11-28T00:56:29+01:00 (6 years ago)
Author:
Don-vip
Message:

see #15310 - remove most of deprecated APIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java

    r12928 r13173  
    55
    66import org.openstreetmap.josm.Main;
    7 import org.openstreetmap.josm.data.Preferences;
    87import org.openstreetmap.josm.io.OsmApi;
    98import org.openstreetmap.josm.spi.preferences.Config;
     
    9695
    9796    /**
    98      * Replies a set of parameters as defined in the preferences.
    99      *
    100      * @param pref the preferences
    101      * @return the parameters
    102      * @deprecated (since 12928) replaced by {@link #createFromApiUrl(java.lang.String)}
    103      */
    104     @Deprecated
    105     public static OAuthParameters createFromPreferences(Preferences pref) {
    106         OAuthParameters parameters = createDefault(pref.get("osm-server.url"));
    107         return new OAuthParameters(
    108                 pref.get("oauth.settings.consumer-key", parameters.getConsumerKey()),
    109                 pref.get("oauth.settings.consumer-secret", parameters.getConsumerSecret()),
    110                 pref.get("oauth.settings.request-token-url", parameters.getRequestTokenUrl()),
    111                 pref.get("oauth.settings.access-token-url", parameters.getAccessTokenUrl()),
    112                 pref.get("oauth.settings.authorise-url", parameters.getAuthoriseUrl()),
    113                 pref.get("oauth.settings.osm-login-url", parameters.getOsmLoginUrl()),
    114                 pref.get("oauth.settings.osm-logout-url", parameters.getOsmLogoutUrl()));
    115     }
    116 
    117     /**
    11897     * Remembers the current values in the preferences.
    11998     */
     
    126105        Config.getPref().put("oauth.settings.osm-login-url", getOsmLoginUrl());
    127106        Config.getPref().put("oauth.settings.osm-logout-url", getOsmLogoutUrl());
    128     }
    129 
    130     /**
    131      * Remembers the current values in the preferences <code>pref</code>.
    132      *
    133      * @param pref the preferences. Must not be null.
    134      * @throws IllegalArgumentException if pref is null.
    135      * @deprecated (since 12928) replaced by {@link #rememberPreferences()}
    136      */
    137     @Deprecated
    138     public void rememberPreferences(Preferences pref) {
    139         CheckParameterUtil.ensureParameterNotNull(pref, "pref");
    140         pref.put("oauth.settings.consumer-key", getConsumerKey());
    141         pref.put("oauth.settings.consumer-secret", getConsumerSecret());
    142         pref.put("oauth.settings.request-token-url", getRequestTokenUrl());
    143         pref.put("oauth.settings.access-token-url", getAccessTokenUrl());
    144         pref.put("oauth.settings.authorise-url", getAuthoriseUrl());
    145         pref.put("oauth.settings.osm-login-url", getOsmLoginUrl());
    146         pref.put("oauth.settings.osm-logout-url", getOsmLogoutUrl());
    147107    }
    148108
Note: See TracChangeset for help on using the changeset viewer.