Package com.tapkey.mobile.tlcp.commands
Class CompatTriggerLockCommandBuilder
- java.lang.Object
-
- com.tapkey.mobile.tlcp.commands.AbstractCommandBuilder<TCmd,T>
-
- com.tapkey.mobile.tlcp.commands.AbstractTriggerLockCommandBuilder<DynamicCommand,CompatTriggerLockCommandBuilder>
-
- com.tapkey.mobile.tlcp.commands.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`:Lock's Protocol Version DefaultTriggerLockCommandB. AutoTriggerLockCommandB. CompatTriggerLockCommandB. < 0x3E (locks only support the default command) 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
-
-
Constructor Summary
Constructors Constructor Description CompatTriggerLockCommandBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicCommand
build()
Builds the command.protected CompatTriggerLockCommandBuilder
getThis()
-
Methods inherited from class com.tapkey.mobile.tlcp.commands.AbstractTriggerLockCommandBuilder
getCustomCommandData, setCustomCommandData
-
Methods inherited from class com.tapkey.mobile.tlcp.commands.AbstractCommandBuilder
getCallerData, setCallerData
-
-
-
-
Method Detail
-
getThis
protected CompatTriggerLockCommandBuilder getThis()
- Specified by:
getThis
in classAbstractCommandBuilder<DynamicCommand,CompatTriggerLockCommandBuilder>
-
build
public DynamicCommand build()
Builds the command.- Specified by:
build
in classAbstractCommandBuilder<DynamicCommand,CompatTriggerLockCommandBuilder>
- Returns:
- The command
-
-