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 Type
    Method
    Description
    default String
     
    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.
    org.eclipse.edc.spi.result.StoreResult<Void>
    Deletes a verifiable credential resource from the store based on the given ID.
    default String
     
    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.
    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 - The QuerySpec indicating the criteria for the query.
      Returns:
      A StoreResult object containing a list of VerifiableCredentialResource objects 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 StoreResult object indicating the result of the operation.
    • deleteById

      org.eclipse.edc.spi.result.StoreResult<Void> deleteById(String id)
      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 StoreResult object indicating the result of the operation.
    • alreadyExistsErrorMessage

      default String alreadyExistsErrorMessage(String id)
    • notFoundErrorMessage

      default String notFoundErrorMessage(String id)