Interface CredentialStore
public interface CredentialStore
The CredentialStore interface represents a store that manages verifiable credentials.
It provides methods for creating, querying, updating, and deleting credentials.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Stringorg.eclipse.edc.spi.result.StoreResult<Void>create(org.eclipse.edc.identityhub.spi.verifiablecredentials.model.VerifiableCredentialResource credentialResource) Creates a verifiable credential resource in the store.org.eclipse.edc.spi.result.StoreResult<Void>deleteById(String id) Deletes a verifiable credential resource from the store based on the given ID.default Stringorg.eclipse.edc.spi.result.StoreResult<Collection<org.eclipse.edc.identityhub.spi.verifiablecredentials.model.VerifiableCredentialResource>>query(org.eclipse.edc.spi.query.QuerySpec querySpec) Queries the store for verifiable credentials based on the given query specification.org.eclipse.edc.spi.result.StoreResult<Void>update(org.eclipse.edc.identityhub.spi.verifiablecredentials.model.VerifiableCredentialResource credentialResource) Updates a verifiable credential resource in the store.
-
Method Details
-
create
org.eclipse.edc.spi.result.StoreResult<Void> create(org.eclipse.edc.identityhub.spi.verifiablecredentials.model.VerifiableCredentialResource credentialResource) Creates a verifiable credential resource in the store.- Parameters:
credentialResource- The verifiable credential resource to create.- Returns:
- A StoreResult object indicating the result of the operation.
-
query
org.eclipse.edc.spi.result.StoreResult<Collection<org.eclipse.edc.identityhub.spi.verifiablecredentials.model.VerifiableCredentialResource>> query(org.eclipse.edc.spi.query.QuerySpec querySpec) Queries the store for verifiable credentials based on the given query specification.- Parameters:
querySpec- TheQuerySpecindicating the criteria for the query.- Returns:
- A
StoreResultobject containing a list ofVerifiableCredentialResourceobjects that match the query.
-
update
org.eclipse.edc.spi.result.StoreResult<Void> update(org.eclipse.edc.identityhub.spi.verifiablecredentials.model.VerifiableCredentialResource credentialResource) Updates a verifiable credential resource in the store.- Parameters:
credentialResource- The verifiable credential resource to update. Note that all fields are overwritten.- Returns:
- A
StoreResultobject indicating the result of the operation.
-
deleteById
Deletes a verifiable credential resource from the store based on the given ID.- Parameters:
id- The ID of the verifiable credential resource to delete.- Returns:
- A
StoreResultobject indicating the result of the operation.
-
alreadyExistsErrorMessage
-
notFoundErrorMessage
-