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.

StatusValue
UNKNOWN-1
ACCEPTED0
CANCELED1
COMPLETED2
PENDING3
REJECTED4
TIMEDOUT5
Public methods
intgetStatusId()
Gets the integer version of the status.
eg. RequestStatus.PENDING.getStatusId();
StringtoString()
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.

StatusValue
UNKNOWN-1
ACTIVE0
REVOKED2
Public methods
DeviceStatusvalueOf(int statusId)
Takes the id of a status and returns a DeviceStatus object.
intgetStatusId()
Gets the integer version of the status.
eg. DeviceStatus.ACTIVE.getStatusId();
StringtoString()
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.

StatusValue
UNKNOWN-1
ACTIVE0
ADMIN_SUSPENDED1
TOKEN_SUSPENDED2
REVOKED3
Public methods
AccountStatusvalueOf(int statusId)
Takes the id of a status and returns an AccountStatus object.
intgetStatusId()
Gets the integer version of the status.
eg. AccountStatus.ACTIVE.getStatusId();
StringtoString()
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.

StatusValue
Unknown-1
Authentication0
RequestCanceled1
RequestTimedOut2
RequestCompleted3
UpdateAccount4
TokenSuspend5
AdminSuspend6
DeviceRevoke7
AccountRevoke8
Resume9
Public methods
intgetTypeId()
Gets the integer version of the status. eg. NotificationType.Authentication.getTypeId();
StringtoString()
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.

NameValue
UNKNOWN-1
NOTIFICATION_CLICKED0
NOTIFICATION_RECEIVED1
REQUEST_FETCHED2
REQUEST_PROCESSED3
REQUEST_VIEWED4
Public methods
intgetTypeId()
Gets the integer version of the status. eg. NotificationType.Authentication.getTypeId();
StringtoString()
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.

TypeValue
AUTHORIZATION0
ACCESS1
BIOMETRIC2
Public methods
intgetTypeId()
Gets the integer version of the status. eg. KeyType.AUTHORIZATION.getTypeId();
StringtoString()
Gets the text representation of the type. All types are lowercase eg. AUTHORIZATION.toString() will return authorization.