Class CompatTriggerLockCommandBuilder


  • public class CompatTriggerLockCommandBuilder
    extends AbstractTriggerLockCommandBuilder<DynamicCommand,​CompatTriggerLockCommandBuilder>
    Allows building a trigger lock command that chooses the action to be performed based on the user's permissions. The behavior of commands issued by instances of this class matches the one of AutoTriggerLockCommands which lets the lock choose the action to be taken. However, some locking devices (i.e. those implementing protocol version 0x3E) don't support this kind of functionality. For these locking devices, instances of this class choose a concrete action type based on the permissions included in the user's key. In most cases this class should be preferred over the AutoTriggerLockCommandBuilder. It should be used in cases, where the caller doesn't know (or doesn't want to know) anything about the concrete action to be taken. E.g. if the app offers the user a simple 'unlock' button, without giving the opertunity of distinguishing between different action types and without knowing much about the type of locking device, then this class should be used for building the TriggerLockCommand. The following table outlines the differences between `DefaultTriggerLockCommandB`, `AutoTriggerLockCommandB` and `CompatTriggerLockCommandB`: Default command
    Lock's Protocol Version DefaultTriggerLockCommandB. AutoTriggerLockCommandB. CompatTriggerLockCommandB.
    < 0x3E (locks only support the default command) Default command Default command
    0x3E Default command Default command Builder chooses based on the user's permission
    >= 0x3F Default command Lock chooses based on the user's permissions Lock chooses based on the user's