-
- All Implemented Interfaces:
-
io.scanbot.sdk.ui.result.ResultRepository
public final class GenericDocumentResultRepository implements ResultRepository<GenericDocument>Provides access to the scanning result of the given type by ResultId The current implementation of the repository keeps the result only in RAM and does not store anything on the persistent storage It is important to persist the data manually if it is needed to be used after the restart of the process of the application Be careful when processing the intent with ResultId in onCreate method of the Activity as it may be recreated after the termination of the process
-
-
Field Summary
Fields Modifier and Type Field Description private final Class<GenericDocument>acceptedTypeprivate final ResultStorage<GenericDocument>storage
-
Constructor Summary
Constructors Constructor Description GenericDocumentResultRepository(ResultStorage<GenericDocument> storage)
-
Method Summary
Modifier and Type Method Description Class<GenericDocument>getAcceptedType()final ResultStorage<GenericDocument>getStorage()ResultWrapper<GenericDocument>addResult(GenericDocument result)GenericDocumentgetResult(String resultId)GenericDocumentgetResultAndErase(String resultId)UnitremoveResult(String resultId)Unitclear()-
-
Method Detail
-
getAcceptedType
Class<GenericDocument> getAcceptedType()
-
getStorage
final ResultStorage<GenericDocument> getStorage()
-
addResult
ResultWrapper<GenericDocument> addResult(GenericDocument result)
-
getResultAndErase
GenericDocument getResultAndErase(String resultId)
-
removeResult
Unit removeResult(String resultId)
-
-
-
-