Enumerations
Summary
PrivakeyCX library provides 7 core enumerations to standardized the code.
RequestStatus
public enum RequestStatus
The available statuses for requests. You can use this class to go between a numerical status and the text status. Note that ACCEPTED
and REJECTED
are legacy and no longer used.
Status | Value |
---|---|
UNKNOWN | -1 |
ACCEPTED | 0 |
CANCELED | 1 |
COMPLETED | 2 |
PENDING | 3 |
REJECTED | 4 |
TIMEDOUT | 5 |
Public methods | |
---|---|
int | getStatusId() Gets the integer version of the status. eg. RequestStatus.PENDING.getStatusId(); |
String | toString() Gets the text representation of the status. All status' are lowercase. eg. PENDING.toString() will return pending . |
DeviceStatus
public enum DeviceStatus
The available statuses for devices. You can use this class to go between a numerical status and the text status.
Status | Value |
---|---|
UNKNOWN | -1 |
ACTIVE | 0 |
REVOKED | 2 |
Public methods | |
---|---|
DeviceStatus | valueOf(int statusId) Takes the id of a status and returns a DeviceStatus object. |
int | getStatusId() Gets the integer version of the status. eg. DeviceStatus.ACTIVE.getStatusId(); |
String | toString() Gets the text representation of the status. All status' are lowercase. eg. ACTIVE.toString() will return active . |
AccountStatus
public enum AccountStatus
The available statuses for the Privakey Account. You can use this class to go between a numerical status and the text status.
Status | Value |
---|---|
UNKNOWN | -1 |
ACTIVE | 0 |
ADMIN_SUSPENDED | 1 |
TOKEN_SUSPENDED | 2 |
REVOKED | 3 |
Public methods | |
---|---|
AccountStatus | valueOf(int statusId) Takes the id of a status and returns an AccountStatus object. |
int | getStatusId() Gets the integer version of the status. eg. AccountStatus.ACTIVE.getStatusId(); |
String | toString() Gets the text representation of the status. All status' are lowercase. eg. ACTIVE.toString() will return active . |
NotificationType
public enum NotificationType
The available types of notifications that the Privakey CX Library recognizes. You can use this class to go between a numerical status and the text status.
Status | Value |
---|---|
Unknown | -1 |
Authentication | 0 |
RequestCanceled | 1 |
RequestTimedOut | 2 |
RequestCompleted | 3 |
UpdateAccount | 4 |
TokenSuspend | 5 |
AdminSuspend | 6 |
DeviceRevoke | 7 |
AccountRevoke | 8 |
Resume | 9 |
Public methods | |
---|---|
int | getTypeId() Gets the integer version of the status. eg. NotificationType.Authentication.getTypeId(); |
String | toString() Gets the text representation of the type. All types are lowercase eg. Authentication.toString() will return authentication . |
TelemetryEvent
public enum TelemetryEvent
The available events for default telemetry. You can use this class to go between a numerical status and the text status.
Name | Value |
---|---|
UNKNOWN | -1 |
NOTIFICATION_CLICKED | 0 |
NOTIFICATION_RECEIVED | 1 |
REQUEST_FETCHED | 2 |
REQUEST_PROCESSED | 3 |
REQUEST_VIEWED | 4 |
Public methods | |
---|---|
int | getTypeId() Gets the integer version of the status. eg. NotificationType.Authentication.getTypeId(); |
String | toString() Gets the text representation of the event. All events are camel case eg. REQUEST_VIEWED.toString() will return requestViewed . |
KeyType
public enum KeyType
The available types for keys. You can use this class to go between a numerical status and the text status.
Type | Value |
---|---|
AUTHORIZATION | 0 |
ACCESS | 1 |
BIOMETRIC | 2 |
Public methods | |
---|---|
int | getTypeId() Gets the integer version of the status. eg. KeyType.AUTHORIZATION.getTypeId(); |
String | toString() Gets the text representation of the type. All types are lowercase eg. AUTHORIZATION.toString() will return authorization . |
Updated over 3 years ago