//document-manager/eu.europa.ec.eudi.wallet.document/DocumentManagerImpl
class DocumentManagerImpl(val identifier: String, val storage: Storage, val secureAreaRepository: SecureAreaRepository, val ktorHttpClientFactory: () -> HttpClient? = null) : DocumentManager
Default implementation of the DocumentManager interface for the EUDI Wallet.
This implementation provides the core functionality for managing digital documents in the EUDI Wallet ecosystem, including:
- Creation of documents with multiple supported formats (MSO mDoc, SD-JWT VC)
- Secure storage and retrieval of documents using provided storage mechanisms
- Management of document lifecycle and state transitions
- Integration with secure area for cryptographic operations and key management
The implementation maintains strict document identity boundaries by using a unique document manager identifier to ensure that documents managed by one instance cannot be accessed or modified by another instance.
release
| identifier | Unique identifier for this document manager instance |
| storage | Storage implementation for persisting document data |
| secureAreaRepository | Repository for secure key management and cryptographic operations |
| ktorHttpClientFactory | Optional factory method to create HTTP clients |
| DocumentManagerImpl | [release] constructor(identifier: String, storage: Storage, secureAreaRepository: SecureAreaRepository, ktorHttpClientFactory: () -> HttpClient? = null) Creates a new DocumentManagerImpl with the required dependencies |
| Name | Summary |
|---|---|
| Companion | [release] object Companion |
| Name | Summary |
|---|---|
| identifier | [release] open override val identifier: String Unique identifier for this document manager instance, used to scope document access |
| ktorHttpClientFactory | [release] val ktorHttpClientFactory: () -> HttpClient? Optional factory to provide custom HTTP clients for network operations |
| secureAreaRepository | [release] open override val secureAreaRepository: SecureAreaRepository Repository for cryptographic operations and secure key management |
| storage | [release] open override val storage: Storage Persistent storage implementation for document data |
| Name | Summary |
|---|---|
| createDocument | [release] open override fun createDocument(format: DocumentFormat, createSettings: CreateDocumentSettings, issuerMetadata: IssuerMetadata? = null): Outcome<UnsignedDocument> Create a new document. This method will create a new document with the given format and keys settings. If the document is successfully created, it will return an UnsignedDocument. This UnsignedDocument contains the keys and the method to proof the ownership of the keys, that can be used with an issuer to retrieve the document's claims. After that the document can be stored using storeIssuedDocument or storeDeferredDocument. |
| deleteDocumentById | [release] open override fun deleteDocumentById(documentId: DocumentId): Outcome<ProofOfDeletion?> Delete a document by its identifier. |
| getDocumentById | [release] open override fun getDocumentById(documentId: DocumentId): Document? Retrieve a document by its identifier. |
| getDocuments | [release] open override fun getDocuments(predicate: (Document) -> Boolean? = null): List<Document> Retrieve all documents. |
| getDocuments | [release] inline fun <T : Document> DocumentManager.getDocuments(): List<T> DocumentManager Extension function that returns a list of documents of type T. If T is IssuedDocument, then only IssuedDocument will be returned. If T is UnsignedDocument, then only UnsignedDocument will be returned, excluding DeferredDocument. If T is DeferredDocument, then only DeferredDocument will be returned. |
| storeDeferredDocument | [release] open override fun storeDeferredDocument(unsignedDocument: UnsignedDocument, relatedData: ByteArray): Outcome<DeferredDocument> Store an unsigned document for deferred issuance. This method will store the document with the related to the issuance data. |
| storeIssuedDocument | [release] open override fun storeIssuedDocument(unsignedDocument: UnsignedDocument, issuerProvidedData: List<IssuerProvidedCredential>): Outcome<IssuedDocument> Store an issued document. This method will store the document with its issuer provided data. |