Class SettingsRanges

Object
com.zebra.sdk.settings.SettingsRanges

public class SettingsRanges extends Object
Methods to use the LinkOS 3.2 JSON syntax to get the ranges for a list of SDGs, without the need to use an allconfig.
  • Method Details

    • getRanges

      public static Map<String,String> getRanges(List<String> settings, Connection printerConnection, PrinterLanguage printerLanguage, LinkOsInformation version) throws IllegalStateException, ConnectionException, com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
      Use the LinkOS 3.2 JSON syntax to get the ranges for a list of SDGs, without the need to use an allconfig.
      Parameters:
      settings - A list of SGD names.
      printerConnection - A connection to a LinkOS printer.
      printerLanguage - the current printer control language
      version - LinkOS version
      Returns:
      A map from setting name to a string representing the range.
      Throws:
      IllegalStateException - if the printer is not LinkOS 3.2 or higher.
      ConnectionException - ConnectionException If the connection fails.
      IOException - if there is an error parsing the JSON response from the printer.
      com.fasterxml.jackson.databind.JsonMappingException - if there is an error parsing the JSON response from the printer.
      com.fasterxml.jackson.core.JsonParseException - if there is an error parsing the JSON response from the printer.
    • parseJsonForRanges

      public static Map<String,String> parseJsonForRanges(String jsonResponse) throws IOException, com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException
      Parse the JSON response from the JSON get range command. Assumes that the only field requested in the JSON get command was the "range" field.
      Parameters:
      jsonResponse - Response from a LinkOS 3.2 or greater printer.
      Returns:
      Map from setting names to range strings.
      Throws:
      IOException - if there is an error parsing the JSON response from the printer.
      com.fasterxml.jackson.databind.JsonMappingException - if there is an error parsing the JSON response from the printer.
      com.fasterxml.jackson.core.JsonParseException - if there is an error parsing the JSON response from the printer.