Interface CredentialDataResult.Entries
-
- Enclosing class:
- CredentialDataResult
public static interface CredentialDataResult.Entries
A class for representing data elements returned.
-
-
Field Summary
Fields Modifier and Type Field Description static int
STATUS_NO_ACCESS_CONTROL_PROFILES
The entry was not retrieved because it was configured without any access control profile.static int
STATUS_NO_SUCH_ENTRY
The entry does not exist.static int
STATUS_NOT_IN_REQUEST_MESSAGE
The entry wasn't in the request message.static int
STATUS_NOT_REQUESTED
The entry was not requested.static int
STATUS_OK
Value was successfully retrieved.static int
STATUS_READER_AUTHENTICATION_FAILED
The entry was not retrieved because reader authentication failed.static int
STATUS_UNKNOWN
The entry was not retrieved and the reason is not known.static int
STATUS_USER_AUTHENTICATION_FAILED
The entry was not retrieved because user authentication failed.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getEntry(java.lang.String namespaceName, java.lang.String name)
Gets the raw CBOR data for the value of an entry.boolean
getEntryBoolean(java.lang.String namespaceName, java.lang.String name)
Gets the value of an entry.byte[]
getEntryBytestring(java.lang.String namespaceName, java.lang.String name)
Gets the value of an entry.android.icu.util.Calendar
getEntryCalendar(java.lang.String namespaceName, java.lang.String name)
Gets the value of an entry.long
getEntryInteger(java.lang.String namespaceName, java.lang.String name)
Gets the value of an entry.java.util.Collection<java.lang.String>
getEntryNames(java.lang.String namespaceName)
Get the names of all requested entries in a name space.java.lang.String
getEntryString(java.lang.String namespaceName, java.lang.String name)
Gets the value of an entry.java.util.Collection<java.lang.String>
getNamespaces()
Gets the names of namespaces with retrieved entries.java.util.Collection<java.lang.String>
getRetrievedEntryNames(java.lang.String namespaceName)
Get the names of all entries that were successfully retrieved from a name space.int
getStatus(java.lang.String namespaceName, java.lang.String name)
Gets the status of an entry.boolean
isUserAuthenticationNeeded()
Helper to determine if at least one if the requested entries returned theSTATUS_USER_AUTHENTICATION_FAILED
status.
-
-
-
Field Detail
-
STATUS_OK
static final int STATUS_OK
Value was successfully retrieved.- See Also:
- Constant Field Values
-
STATUS_NO_SUCH_ENTRY
static final int STATUS_NO_SUCH_ENTRY
The entry does not exist.- See Also:
- Constant Field Values
-
STATUS_NOT_REQUESTED
static final int STATUS_NOT_REQUESTED
The entry was not requested.- See Also:
- Constant Field Values
-
STATUS_NOT_IN_REQUEST_MESSAGE
static final int STATUS_NOT_IN_REQUEST_MESSAGE
The entry wasn't in the request message.- See Also:
- Constant Field Values
-
STATUS_USER_AUTHENTICATION_FAILED
static final int STATUS_USER_AUTHENTICATION_FAILED
The entry was not retrieved because user authentication failed.- See Also:
- Constant Field Values
-
STATUS_READER_AUTHENTICATION_FAILED
static final int STATUS_READER_AUTHENTICATION_FAILED
The entry was not retrieved because reader authentication failed.- See Also:
- Constant Field Values
-
STATUS_NO_ACCESS_CONTROL_PROFILES
static final int STATUS_NO_ACCESS_CONTROL_PROFILES
The entry was not retrieved because it was configured without any access control profile.- See Also:
- Constant Field Values
-
STATUS_UNKNOWN
static final int STATUS_UNKNOWN
The entry was not retrieved and the reason is not known.- See Also:
- Constant Field Values
-
-
Method Detail
-
getNamespaces
@NonNull java.util.Collection<java.lang.String> getNamespaces()
Gets the names of namespaces with retrieved entries.- Returns:
- collection of name of namespaces containing retrieved entries. May be empty if no data was retrieved.
-
getEntryNames
@NonNull java.util.Collection<java.lang.String> getEntryNames(@NonNull java.lang.String namespaceName)
Get the names of all requested entries in a name space.This includes the name of entries that weren't successfully retrieved. It is an error to call this with a namespace not returned in
getNamespaces()
.- Parameters:
namespaceName
- the namespace name to get entries for.- Returns:
- A collection of names for the given namespace.
-
getRetrievedEntryNames
@NonNull java.util.Collection<java.lang.String> getRetrievedEntryNames(@NonNull java.lang.String namespaceName)
Get the names of all entries that were successfully retrieved from a name space.This only returns entries for which
getStatus(String, String)
will returnSTATUS_OK
. It is an error to call this with a namespace not returned ingetNamespaces()
.- Parameters:
namespaceName
- the namespace name to get entries for.- Returns:
- The entries in the given namespace that were successfully rerieved.
- Throws:
java.lang.IllegalArgumentException
- if called with a name space not returned ingetNamespaces()
.
-
getStatus
int getStatus(@NonNull java.lang.String namespaceName, @NonNull java.lang.String name)
Gets the status of an entry.This returns one of
STATUS_OK
if the value was retrievedSTATUS_NO_SUCH_ENTRY
if the given entry wasn't retrievedSTATUS_NOT_REQUESTED
if it wasn't requestedSTATUS_NOT_IN_REQUEST_MESSAGE
if the request message was set but the entry wasn't present in the request messageSTATUS_USER_AUTHENTICATION_FAILED
if the value wasn't retrieved because the necessary user authentication wasn't performedSTATUS_READER_AUTHENTICATION_FAILED
if the supplied reader certificate chain didn't match the set of certificates the entry was provisioned withSTATUS_NO_ACCESS_CONTROL_PROFILES
if the entry was configured without any access control profiles.STATUS_UNKNOWN
if the entry wasn't retrieved but it's not known why.
- Parameters:
namespaceName
- the namespace name of the entry.name
- the name of the entry to get the value for.- Returns:
- the status indicating whether the value was retrieved and if not, why.
-
getEntry
@Nullable byte[] getEntry(@NonNull java.lang.String namespaceName, @NonNull java.lang.String name)
Gets the raw CBOR data for the value of an entry.This should only be called on an entry for which the
getStatus(String, String)
method returnsSTATUS_OK
.- Parameters:
namespaceName
- the namespace name of the entry.name
- the name of the entry to get the value for.- Returns:
- the raw CBOR data or
null
if no entry with the given name exists.
-
getEntryString
@Nullable java.lang.String getEntryString(@NonNull java.lang.String namespaceName, @NonNull java.lang.String name)
Gets the value of an entry.This should only be called on an entry for which the
getStatus(String, String)
method returnsSTATUS_OK
.- Parameters:
namespaceName
- the namespace name of the entry.name
- the name of the entry to get the value for.- Returns:
- a
String
ornull
if no entry with the given name exists.
-
getEntryBytestring
@Nullable byte[] getEntryBytestring(@NonNull java.lang.String namespaceName, @NonNull java.lang.String name)
Gets the value of an entry.This should only be called on an entry for which the
getStatus(String, String)
method returnsSTATUS_OK
.- Parameters:
namespaceName
- the namespace name of the entry.name
- the name of the entry to get the value for.- Returns:
- a
byte[]
ornull
if no entry with the given name exists.
-
getEntryInteger
long getEntryInteger(@NonNull java.lang.String namespaceName, @NonNull java.lang.String name)
Gets the value of an entry.This should only be called on an entry for which the
getStatus(String, String)
method returnsSTATUS_OK
.- Parameters:
namespaceName
- the namespace name of the entry.name
- the name of the entry to get the value for.- Returns:
- a
long
or 0 if no entry with the given name exists.
-
getEntryBoolean
boolean getEntryBoolean(@NonNull java.lang.String namespaceName, @NonNull java.lang.String name)
Gets the value of an entry.This should only be called on an entry for which the
getStatus(String, String)
method returnsSTATUS_OK
.- Parameters:
namespaceName
- the namespace name of the entry.name
- the name of the entry to get the value for.- Returns:
- a
boolean
orfalse
if no entry with the given name exists.
-
getEntryCalendar
@Nullable android.icu.util.Calendar getEntryCalendar(@NonNull java.lang.String namespaceName, @NonNull java.lang.String name)
Gets the value of an entry.This should only be called on an entry for which the
getStatus(String, String)
method returnsSTATUS_OK
.- Parameters:
namespaceName
- the namespace name of the entry.name
- the name of the entry to get the value for.- Returns:
- a
Calendar
ornull
if no entry with the given name exists.
-
isUserAuthenticationNeeded
boolean isUserAuthenticationNeeded()
Helper to determine if at least one if the requested entries returned theSTATUS_USER_AUTHENTICATION_FAILED
status.- Returns:
- true if at least one entry wasn't retrieved because user authentication was needed.
-
-