public interface SettingsProvider
Modifier and Type | Method and Description |
---|---|
java.util.Map<String,Setting> |
getAllSettings()
Retrieve all settings and their attributes.
|
java.util.Map<String,String> |
getAllSettingValues()
Retrieves all of the device's setting values.
|
java.util.Set<String> |
getAvailableSettings()
Retrieve all of the setting identifiers for a device.
|
String |
getSettingRange(String settingId)
Retrieves the allowable range for a setting.
|
java.util.Map<String,String> |
getSettingsValues(java.util.List<String> listOfSettings)
Retrieves the device's setting values for a list of setting IDs.
|
String |
getSettingType(String settingId)
Returns the data type of the setting.
|
String |
getSettingValue(String settingId)
Retrieves the device's setting value for a setting id.
|
boolean |
isSettingReadOnly(String settingId)
Returns true if the setting is read only.
|
boolean |
isSettingValid(String settingId,
String value)
Returns true if value is valid for the given setting.
|
boolean |
isSettingWriteOnly(String settingId)
Returns true if the setting is write only.
|
java.util.Map<String,String> |
processSettingsViaMap(java.util.Map<String,String> settingValuePairs)
Change or retrieve printer settings.
|
void |
setSetting(String settingId,
String value)
Sets the setting to the given value.
|
void |
setSettings(java.util.Map<String,String> settingValuePairs)
Set more than one setting.
|
java.util.Set<String> getAvailableSettings() throws SettingsException
SettingsException
- if the settings could not be loadedgetSettingValue(String)
String getSettingValue(String settingId) throws SettingsException, ConnectionException, ZebraIllegalArgumentException
settingId
- setting id.SettingsException
- if the setting could not be retrieved.ZebraIllegalArgumentException
- if there was an error parsing the response from the printer.ConnectionException
- if there is an error communicating with the printer.java.util.Map<String,String> getSettingsValues(java.util.List<String> listOfSettings) throws SettingsException, ConnectionException, ZebraIllegalArgumentException
listOfSettings
- list of setting IDs.SettingsException
- if the settings could not be retrieved.ZebraIllegalArgumentException
- if there was an error parsing the response from the printer.ConnectionException
- if there is an error communicating with the printer.java.util.Map<String,Setting> getAllSettings() throws SettingsException
SettingsException
- if the settings could not be retrievedjava.util.Map<String,String> getAllSettingValues() throws SettingsException
SettingsException
- if the settings could not be loadedgetAllSettingValues()
void setSetting(String settingId, String value) throws SettingsException
settingId
- setting id.value
- The setting's valueSettingsException
- if the setting is read only, does not exist, or if the setting could not be setvoid setSettings(java.util.Map<String,String> settingValuePairs) throws SettingsException
settingValuePairs
- Map a setting ID to the new value for the setting.SettingsException
- if the settings cannot be sent to the device.String getSettingRange(String settingId) throws SettingsException
settingId
- setting id.SettingsException
- if the setting does not existboolean isSettingValid(String settingId, String value) throws SettingsException
settingId
- setting id.value
- the setting's valueSettingsException
- if the setting does not existboolean isSettingReadOnly(String settingId) throws SettingsException
settingId
- the setting idSettingsException
- if the setting does not existboolean isSettingWriteOnly(String settingId) throws SettingsException
settingId
- the setting idSettingsException
- if the setting does not existString getSettingType(String settingId) throws SettingsException
settingId
- the setting idSettingsException
- if the setting does not existjava.util.Map<String,String> processSettingsViaMap(java.util.Map<String,String> settingValuePairs) throws SettingsException, ConnectionException
Note: Due to the setting verification and validation, additional time and data traffic will be needed for each
processSettingsViaMap
method call. It is recommended to bundle all settings into one map and one method call to
reduce this overhead.
settingValuePairs
- The settings to change or retrieveSettingsException
- if a setting is malformed, or one or more settings could not be set.ConnectionException
- if there is an error communicating with the printer.
© 2017 ZIH Corp. All Rights Reserved.