Class MedicalCertificateRecognizerResultRepository
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ui.result.ResultRepository
public final class MedicalCertificateRecognizerResultRepository implements ResultRepository<MedicalCertificateRecognizerResult>
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<MedicalCertificateRecognizerResult>
acceptedType
private final ResultStorage<MedicalCertificateRecognizerResult>
storage
-
Constructor Summary
Constructors Constructor Description MedicalCertificateRecognizerResultRepository(ResultStorage<MedicalCertificateRecognizerResult> storage)
-
Method Summary
Modifier and Type Method Description Class<MedicalCertificateRecognizerResult>
getAcceptedType()
final ResultStorage<MedicalCertificateRecognizerResult>
getStorage()
ResultWrapper<MedicalCertificateRecognizerResult>
addResult(MedicalCertificateRecognizerResult result)
Allows to add a scanning result into the repository MedicalCertificateRecognizerResult
getResult(String resultId)
Returns the result for a given ResultId MedicalCertificateRecognizerResult
getResultAndErase(String resultId)
Returns the result for a given ResultId and delete it from the repository Use this method if you just need to process the result after the successful recognition to keep the usage of memory low Unit
removeResult(String resultId)
Removes the result with a given ResultId from the repository Unit
clear()
Deletes all the results from the repository -
-
Constructor Detail
-
MedicalCertificateRecognizerResultRepository
MedicalCertificateRecognizerResultRepository(ResultStorage<MedicalCertificateRecognizerResult> storage)
-
-
Method Detail
-
getAcceptedType
Class<MedicalCertificateRecognizerResult> getAcceptedType()
-
getStorage
final ResultStorage<MedicalCertificateRecognizerResult> getStorage()
-
addResult
ResultWrapper<MedicalCertificateRecognizerResult> addResult(MedicalCertificateRecognizerResult result)
Allows to add a scanning result into the repository
- Parameters:
result
- result object which should be added
-
getResult
MedicalCertificateRecognizerResult getResult(String resultId)
Returns the result for a given ResultId
- Parameters:
resultId
- id to find the result for
-
getResultAndErase
MedicalCertificateRecognizerResult getResultAndErase(String resultId)
Returns the result for a given ResultId and delete it from the repository Use this method if you just need to process the result after the successful recognition to keep the usage of memory low
-
removeResult
Unit removeResult(String resultId)
Removes the result with a given ResultId from the repository
- Parameters:
resultId
- id to delete the result
-
-
-
-