Interface CredentialDataResult.Entries
-
- Enclosing class:
- CredentialDataResult
public static interface CredentialDataResult.EntriesA class for representing data elements returned.
-
-
Field Summary
Fields Modifier and Type Field Description static intSTATUS_NO_ACCESS_CONTROL_PROFILESThe entry was not retrieved because it was configured without any access control profile.static intSTATUS_NO_SUCH_ENTRYThe entry does not exist.static intSTATUS_NOT_IN_REQUEST_MESSAGEThe entry wasn't in the request message.static intSTATUS_NOT_REQUESTEDThe entry was not requested.static intSTATUS_OKValue was successfully retrieved.static intSTATUS_READER_AUTHENTICATION_FAILEDThe entry was not retrieved because reader authentication failed.static intSTATUS_UNKNOWNThe entry was not retrieved and the reason is not known.static intSTATUS_USER_AUTHENTICATION_FAILEDThe 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.booleangetEntryBoolean(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.CalendargetEntryCalendar(java.lang.String namespaceName, java.lang.String name)Gets the value of an entry.longgetEntryInteger(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.StringgetEntryString(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.intgetStatus(java.lang.String namespaceName, java.lang.String name)Gets the status of an entry.booleanisUserAuthenticationNeeded()Helper to determine if at least one if the requested entries returned theSTATUS_USER_AUTHENTICATION_FAILEDstatus.
-
-
-
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_OKif the value was retrievedSTATUS_NO_SUCH_ENTRYif the given entry wasn't retrievedSTATUS_NOT_REQUESTEDif it wasn't requestedSTATUS_NOT_IN_REQUEST_MESSAGEif the request message was set but the entry wasn't present in the request messageSTATUS_USER_AUTHENTICATION_FAILEDif the value wasn't retrieved because the necessary user authentication wasn't performedSTATUS_READER_AUTHENTICATION_FAILEDif the supplied reader certificate chain didn't match the set of certificates the entry was provisioned withSTATUS_NO_ACCESS_CONTROL_PROFILESif the entry was configured without any access control profiles.STATUS_UNKNOWNif 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
nullif 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
Stringornullif 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[]ornullif 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
longor 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
booleanorfalseif 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
Calendarornullif 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_FAILEDstatus.- Returns:
- true if at least one entry wasn't retrieved because user authentication was needed.
-
-