Enum Class UploadStrategy

java.lang.Object
java.lang.Enum<UploadStrategy>
org.openstreetmap.josm.io.UploadStrategy
All Implemented Interfaces:
Serializable, Comparable<UploadStrategy>, Constable

public enum UploadStrategy extends Enum<UploadStrategy>
The chunk mode to use when uploading
Since:
12687 (moved from gui.io package)
  • Enum Constant Details

  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static UploadStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UploadStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromPreference

      public static UploadStrategy fromPreference(String preferenceValue)
      Reads the value from preferences
      Parameters:
      preferenceValue - The preference value
      Returns:
      The UploadStrategy for that preference or null if unknown
    • getPreferenceValue

      Replies the value which is written to the preferences for a specific upload strategy
      Returns:
      the value which is written to the preferences for a specific upload strategy
    • getFromPreferences

      Replies the upload strategy currently configured in the preferences. Checks for the preference key
      osm-server.upload-strategy
      . If missing or if the preference value is illegal, DEFAULT_UPLOAD_STRATEGY is replied.
      Returns:
      the upload strategy currently configured in the preferences.
    • saveToPreferences

      public static void saveToPreferences(UploadStrategy strategy)
      Saves the upload strategy strategy to the preferences.
      Parameters:
      strategy - the strategy to save