Package com.tapkey.mobile.model
Enum CommandResult.CommandResultCode
- java.lang.Object
-
- java.lang.Enum<CommandResult.CommandResultCode>
-
- com.tapkey.mobile.model.CommandResult.CommandResultCode
-
- All Implemented Interfaces:
Serializable
,Comparable<CommandResult.CommandResultCode>
- Enclosing class:
- CommandResult
public static enum CommandResult.CommandResultCode extends Enum<CommandResult.CommandResultCode>
Represents a command's result code. The result codes in this enum are sorted by priority.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LockCommunicationError
A transport-level error occurred when communicating with the locking device, e.g.LockDateTimeInvalid
Lock date/time are invalid.LockNotFullyAssembled
The lock is not fully assembled.LockVersionTooOld
The lock is not supported anymore by this version of the SDK.LockVersionTooYoung
The lock's firmware is not yet supported by this version of the SDK.Ok
Command executed successfully as requested.ServerCommunicationError
An error occurred while trying to communicate with the Tapkey Trust Service (e.g.TechnicalError
Some unspecific technical error has occurred.TemporarilyUnauthorized
The key is valid but access is denied due to ICAL restrictions of the grant.Unauthorized
Communication with the security backend succeeded but the user is not authorized for the given command on this locking device.Unauthorized_NotYetValid
The key is not yet valid but will be in the future.UnknownTagType
The lock is not a known Tapkey lock.UserSpecificError
An error occurred on user level.WrongLockMode
Lock is in the wrong mode for this command (e.g.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CommandResult.CommandResultCode
valueOf(String name)
Returns the enum constant of this type with the specified name.static CommandResult.CommandResultCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Ok
public static final CommandResult.CommandResultCode Ok
Command executed successfully as requested.
-
WrongLockMode
public static final CommandResult.CommandResultCode WrongLockMode
Lock is in the wrong mode for this command (e.g. in owner mode while triggering the lock). Certain commands require that the lock is in a certain mode. E.g. the trigger lock command requires the 'Normal' mode, while the Bind command requires the 'Owner' Mode.
-
LockVersionTooOld
public static final CommandResult.CommandResultCode LockVersionTooOld
The lock is not supported anymore by this version of the SDK. An update of the lock's firmware is required.
-
LockVersionTooYoung
public static final CommandResult.CommandResultCode LockVersionTooYoung
The lock's firmware is not yet supported by this version of the SDK. Upgrade to the latest version of the SDK.
-
LockNotFullyAssembled
public static final CommandResult.CommandResultCode LockNotFullyAssembled
The lock is not fully assembled. Certain types of locks may ship in multiple parts and need to be assembled before use.
-
ServerCommunicationError
public static final CommandResult.CommandResultCode ServerCommunicationError
An error occurred while trying to communicate with the Tapkey Trust Service (e.g. due to bad internet connection). Communication with the Tapkey Trust Service is, for instance, required when trying to execute triggerLock on a lock without having a valid key. The Mobile SDK will try to contact the Tapkey Trust Service and look for a key and, in case of a network error, issue this error.
-
LockDateTimeInvalid
public static final CommandResult.CommandResultCode LockDateTimeInvalid
Lock date/time are invalid. If the locking device's clock differs more than ten minutes from the Tapkey Trust Service, the Mobile SDK will attempt to synchronize the clock automatically. This error will occur if unlocking fails and the the time on the lock differs more than ten minutes from the Tapkey Trust Service and automatic synchronization failed for more than 30 seconds.
-
TemporarilyUnauthorized
public static final CommandResult.CommandResultCode TemporarilyUnauthorized
The key is valid but access is denied due to ICAL restrictions of the grant. See the corresponding grant for more information.
-
Unauthorized_NotYetValid
public static final CommandResult.CommandResultCode Unauthorized_NotYetValid
The key is not yet valid but will be in the future. See the corresponding grant for more information.
-
Unauthorized
public static final CommandResult.CommandResultCode Unauthorized
Communication with the security backend succeeded but the user is not authorized for the given command on this locking device.
-
LockCommunicationError
public static final CommandResult.CommandResultCode LockCommunicationError
A transport-level error occurred when communicating with the locking device, e.g. NFC or Bluetooth connection was lost. If this error keeps occurring, the phone model may be incompatible with the present locking device.
-
UnknownTagType
public static final CommandResult.CommandResultCode UnknownTagType
The lock is not a known Tapkey lock.
-
UserSpecificError
public static final CommandResult.CommandResultCode UserSpecificError
An error occurred on user level. ExaminingCommandResult.UserCommandResult
is usually not required and can be treated likeTechnicalError
.
-
TechnicalError
public static final CommandResult.CommandResultCode TechnicalError
Some unspecific technical error has occurred. In case this error happens, showing a generic error message to the user and letting them retry is recommended.
-
-
Method Detail
-
values
public static CommandResult.CommandResultCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CommandResult.CommandResultCode c : CommandResult.CommandResultCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CommandResult.CommandResultCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-