Interface DataRepository
public interface DataRepository
Data Repository used by wallet to store application instances, credentials, revocation signatures etc.
Wallet automatically initializes ``DataRepositoryImpl`` with default implementation of ``StorageManagerContract``
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Delete credential from storageList<com.pingidentity.did.sdk.types.Claim>
Retrieve all stored credentialscom.pingidentity.did.sdk.client.service.model.ApplicationInstance
com.pingidentity.did.sdk.client.service.model.ApplicationInstance
getApplicationInstance
(PingOneRegion walletRegion) com.pingidentity.did.sdk.types.Claim
getCredential
(String id) Get Credential for idcom.pingidentity.did.sdk.types.ClaimReference
Get reference for revoked credentialsRetrieve all active PingOneRegions used by walletgetStringSet
(String key) void
init
(StorageManagerContract storageManager) Initialize DataRepository with implementation of StorageManagerContractboolean
isCredentialRevoked
(String credentialId) Check if a credential had been revokedvoid
saveApplicationInstance
(PingOneRegion walletRegion, com.pingidentity.did.sdk.client.service.model.ApplicationInstance applicationInstance) void
saveCredential
(com.pingidentity.did.sdk.types.Claim credential) Saves credential to storagevoid
saveCredentialIds
(Set<String> credentialIds) void
saveCredentialReference
(com.pingidentity.did.sdk.types.ClaimReference credentialReference) Save reference for revoked credentialsvoid
saveCredentialReferenceIds
(Set<String> credentialReferenceIds) void
saveRegions
(Set<PingOneRegion> pingOneRegions) void
saveString
(String str, String key) void
saveStringSet
(Set<String> set, String key) void
setStorageErrorHandler
(StorageErrorHandler storageErrorHandler) androidx.lifecycle.MutableLiveData<List<com.pingidentity.did.sdk.types.Claim>>
-
Method Details
-
init
Initialize DataRepository with implementation of StorageManagerContract- Parameters:
storageManager
- : Implementation of StorageManagerContract- See Also:
-
saveCredential
void saveCredential(com.pingidentity.did.sdk.types.Claim credential) Saves credential to storage- Parameters:
credential
- : Claim to save
-
getCredential
Get Credential for id- Parameters:
id
- : String id for stored Claim- Returns:
- Claim if found, null otherwise
-
saveCredentialReference
void saveCredentialReference(com.pingidentity.did.sdk.types.ClaimReference credentialReference) Save reference for revoked credentials- Parameters:
credentialReference
- : ClaimReference
-
getCredentialReference
Get reference for revoked credentials- Parameters:
id
- : String id for stored ClaimReference- Returns:
- ClaimReference if found, null otherwise
-
isCredentialRevoked
Check if a credential had been revoked- Parameters:
credentialId
- : String credential id- Returns:
- boolean: True if credential revoked, False otherwise
-
deleteCredential
Delete credential from storage- Parameters:
id
- : String id for the credential to delete
-
getAllCredentials
List<com.pingidentity.did.sdk.types.Claim> getAllCredentials()Retrieve all stored credentials- Returns:
- List of Claim objects.
-
subscribeCredentialsChange
androidx.lifecycle.MutableLiveData<List<com.pingidentity.did.sdk.types.Claim>> subscribeCredentialsChange() -
saveCredentialIds
-
saveCredentialReferenceIds
-
getRegions
Set<PingOneRegion> getRegions()Retrieve all active PingOneRegions used by wallet- Returns:
- Set of PingOneRegion objects
-
saveRegions
-
getStorageErrorHandler
StorageErrorHandler getStorageErrorHandler() -
setStorageErrorHandler
-
saveApplicationInstance
void saveApplicationInstance(PingOneRegion walletRegion, com.pingidentity.did.sdk.client.service.model.ApplicationInstance applicationInstance) -
getApplicationInstance
com.pingidentity.did.sdk.client.service.model.ApplicationInstance getApplicationInstance() -
getApplicationInstance
com.pingidentity.did.sdk.client.service.model.ApplicationInstance getApplicationInstance(PingOneRegion walletRegion) -
saveString
-
getString
-
saveStringSet
-
getStringSet
-