to top
Datalogic APIs
public class

BluetoothSilentPairingWhitelisting

extends SerializableBlob
java.lang.Object
   ↳ com.datalogic.device.configuration.SerializableBlob
     ↳ com.datalogic.device.configuration.BluetoothSilentPairingWhitelisting

Class Overview

BluetoothSilentPairingWhitelisting implements the class that manages the silent pairing devices whitelisting. The class is managed by the ConfigurationManager BlobProperty BT_SILENT_PAIRING_WHITELISTING.

Summary

Nested Classes
enum BluetoothSilentPairingWhitelisting.IdentifierType  
Public Constructors
BluetoothSilentPairingWhitelisting()
Constructor
BluetoothSilentPairingWhitelisting(Map<String, BluetoothSilentPairingWhitelisting.IdentifierType> value)
Constructor
Public Methods
boolean addByMac(String macAddress)
Whitelist a new device identified with the given MAC address.
boolean addByName(String deviceName)
Whitelist a new device identified with the given name.
boolean addByOui(String ouiIdentifier)
Whitelist a new device identified with the given OUI ID.
void clear()
Revoke all whitelisted devices.
Map<String, BluetoothSilentPairingWhitelisting.IdentifierType> get()
Retrieve a map containing all whitelisted devices.
List<String> getByMac()
Retrieve a list containing the devices whitelisted by MAC address.
List<String> getByName()
Retrieve a list containing the devices whitelisted by name.
List<String> getByOui()
Retrieve a list containing the devices whitelisted by OUI identifier.
boolean hasByMac(String macAddress)
Check if a device identified with the given MAC Address is whitelisted.
boolean hasByName(String deviceName)
Check if a device identified with the given name is whitelisted.
boolean hasByOui(String ouiIdentifier)
Check if a device identified with the given OUI ID is whitelisted.
boolean hasDevice(String macAddress, String deviceName)
Check if a device identified with the given name, MAC address or OUI ID is whitelisted.
boolean removeByMac(String macAddress)
Remove from the whitelist a device with the given MAC address.
boolean removeByName(String deviceName)
Remove from the whitelist a device with the given name.
boolean removeByOui(String ouiIdentifier)
Remove from the whitelist a device with the given OUI ID.
[Expand]
Inherited Methods
From class com.datalogic.device.configuration.SerializableBlob
From class java.lang.Object

Public Constructors

public BluetoothSilentPairingWhitelisting ()

Added in revision 36

Constructor

public BluetoothSilentPairingWhitelisting (Map<String, BluetoothSilentPairingWhitelisting.IdentifierType> value)

Added in revision 36

Constructor

Parameters
value Map

Public Methods

public boolean addByMac (String macAddress)

Added in revision 36

Whitelist a new device identified with the given MAC address. If the entry already exists, the value will not be updated.

Parameters
macAddress String
Returns
  • boolean retrieves true if the entry has been successfully added to the whitelist; otherwise, false.

public boolean addByName (String deviceName)

Added in revision 36

Whitelist a new device identified with the given name. If the entry already exists, the value will not be updated. The device name can also be provided as a regular expression (regex), allowing for more flexible matching of device names. This feature enables the addition of multiple devices that match a certain pattern, rather than requiring an exact name match.

The advantage of supporting regular expressions is that it allows for more flexible and dynamic whitelisting, such as adding devices that share a common naming pattern without having to specify each name individually.

Parameters
deviceName String - The device name can be provided as a plain string or as a regular expression (regex). If a regex is used, any device whose name matches the pattern will be added to the whitelist.
Returns
  • boolean - Returns true if the entry has been successfully added to the whitelist; otherwise, false.

public boolean addByOui (String ouiIdentifier)

Added in revision 36

Whitelist a new device identified with the given OUI ID. If the entry already exists, the value will not be updated.

Parameters
ouiIdentifier String
Returns
  • boolean retrieves true if the entry has been successfully added to the whitelist; otherwise, false.

public void clear ()

Added in revision 36

Revoke all whitelisted devices.

public Map<String, BluetoothSilentPairingWhitelisting.IdentifierType> get ()

Added in revision 36

Retrieve a map containing all whitelisted devices.

Returns
  • Map.

public List<String> getByMac ()

Added in revision 36

Retrieve a list containing the devices whitelisted by MAC address.

Returns
  • List.

public List<String> getByName ()

Added in revision 36

Retrieve a list containing the devices whitelisted by name.

Returns
  • List.

public List<String> getByOui ()

Added in revision 36

Retrieve a list containing the devices whitelisted by OUI identifier.

Returns
  • List.

public boolean hasByMac (String macAddress)

Added in revision 36

Check if a device identified with the given MAC Address is whitelisted.

Parameters
macAddress String
Returns
  • boolean tells if the device is whitelisted.

public boolean hasByName (String deviceName)

Added in revision 36

Check if a device identified with the given name is whitelisted.

Parameters
deviceName String
Returns
  • boolean tells if the device is whitelisted.

public boolean hasByOui (String ouiIdentifier)

Added in revision 36

Check if a device identified with the given OUI ID is whitelisted.

Parameters
ouiIdentifier String
Returns
  • boolean tells if the device is whitelisted.

public boolean hasDevice (String macAddress, String deviceName)

Added in revision 36

Check if a device identified with the given name, MAC address or OUI ID is whitelisted. The OUI ID is retrieved from the MAC address.

Parameters
macAddress String
deviceName String
Returns
  • boolean tells if the device is whitelisted.

public boolean removeByMac (String macAddress)

Added in revision 36

Remove from the whitelist a device with the given MAC address. If the entry doesn't exists, nothing happens and the method returns false.

Parameters
macAddress String
Returns
  • boolean retrieves true if the entry has been successfully removed from the whitelist; otherwise, false.

public boolean removeByName (String deviceName)

Added in revision 36

Remove from the whitelist a device with the given name. If the entry doesn't exist, nothing happens and the method returns false. If the device name is provided as a regular expression (regex), the method will remove the whitelist entry that matches the given regex, but only if the whitelist was previously configured with a regex for device names.

The ability to use a regex allows for the removal of a specific whitelisting rule that was previously added using a regex, providing flexibility in managing device whitelisting based on patterns.

Parameters
deviceName String - The device name can be provided as a plain string or as a regular expression (regex). If a regex was used when adding devices to the whitelist, this method will remove the specific whitelisting rule for that regex pattern.
Returns
  • boolean - Returns true if the whitelist entry associated with the given name or regex has been successfully removed; otherwise, false.

public boolean removeByOui (String ouiIdentifier)

Added in revision 36

Remove from the whitelist a device with the given OUI ID. If the entry doesn't exists, nothing happens and the method returns false.

Parameters
ouiIdentifier String
Returns
  • boolean retrieves true if the entry has been successfully removed from the whitelist; otherwise, false.