Class RegistrationAssertion


  • public final class RegistrationAssertion
    extends Object
    Encapsulates the registration assertion information for a device as defined by the Device Registration API.
    • Constructor Detail

      • RegistrationAssertion

        public RegistrationAssertion​(String deviceId)
        Creates a new registration assertion for a device.
        Parameters:
        deviceId - The identifier of the device.
    • Method Detail

      • getDeviceId

        public String getDeviceId()
        Gets the identifier of the asserted device.
        Returns:
        The identifier.
      • getAuthorizedGateways

        public List<String> getAuthorizedGateways()
        Gets the gateway devices that are authorized to act on behalf of the device.
        Returns:
        The gateway identifiers.
      • setAuthorizedGateways

        public RegistrationAssertion setAuthorizedGateways​(List<String> gatewayIds)
        Sets the gateway devices that are authorized to act on behalf of the device.
        Parameters:
        gatewayIds - The gateway identifiers or null to clear the list.
        Returns:
        A reference to this object for method chaining.
      • getMapper

        public String getMapper()
        Gets the name of the mapper definition to use for the device.
        Returns:
        The mapper or null if not set.
      • setMapper

        public RegistrationAssertion setMapper​(String mapper)
        Sets the name of the mapper definition to use for the device.
        Parameters:
        mapper - The mapper to set or null if no mapper should be used.
        Returns:
        A reference to this object for method chaining.
      • getDefaults

        public Map<String,​Object> getDefaults()
        Gets default properties to be used for augmenting messages from the device with missing information.
        Returns:
        An unmodifiable view on the properties.
      • setDefaults

        public RegistrationAssertion setDefaults​(Map<String,​Object> defaults)
        Sets default properties to be used for augmenting messages from the device with missing information.
        Parameters:
        defaults - The properties to set or null to clear all properties.
        Returns:
        A reference to this object for method chaining.