DocumentManager

public final class DocumentManager

The DocumentManager is a high level API on top of the Gini API, which is used via the ApiCommunicator. It provides high level methods to handle document related tasks easily.

Constructors

DocumentManager
Link copied to clipboard
DocumentManager DocumentManager(DocumentTaskManager documentTaskManager)

Functions

createCompositeDocument
Link copied to clipboard
final Document createCompositeDocument(LinkedHashMap<Document, Integer> documentRotationMap, DocumentTaskManager.DocumentType documentType)
Creates a new Gini composite document.
final Document createCompositeDocument(List<Document> documents, DocumentTaskManager.DocumentType documentType)
Creates a new Gini composite document.
createPartialDocument
Link copied to clipboard
final Document createPartialDocument(ByteArray document, String contentType, String filename, DocumentTaskManager.DocumentType documentType, DocumentMetadata documentMetadata)
Uploads raw data and creates a new Gini partial document.
createPaymentRequest
Link copied to clipboard
final String createPaymentRequest(PaymentRequestInput paymentRequestInput)
A PaymentRequest is used to have on the backend the intent of making a payment for a document with its (modified) extractions and specific payment provider.
deleteDocument
Link copied to clipboard
final Unit deleteDocument(String documentId)
Deletes a Gini document.
deletePartialDocumentAndParents
Link copied to clipboard
final Unit deletePartialDocumentAndParents(String documentId)
Deletes a Gini partial document and all its parent composite documents.
getDocument
Link copied to clipboard
final Document getDocument(Uri uri)
Get the document with the given unique identifier.
final Document getDocument(String id)
Get the document with the given unique identifier.
getExtractions
Link copied to clipboard
final ExtractionsContainer getExtractions(Document document)
Get the extractions for the given document.
getLayout
Link copied to clipboard
final JSONObject getLayout(Document document)
Gets the layout of a document.
getPageImage
Link copied to clipboard
final ByteArray getPageImage(String documentId, Integer page)
Get the rendered image of a page as byte[]
getPayment
Link copied to clipboard
final Payment getPayment(String id)
Get information about the payment of the PaymentRequest
getPaymentProvider
Link copied to clipboard
final PaymentProvider getPaymentProvider(String id)
getPaymentProviders
Link copied to clipboard
final List<PaymentProvidergetPaymentProviders()
A payment provider is a Gini partner which integrated the GiniPay for Banks SDK into their mobile apps.
getPaymentRequest
Link copied to clipboard
final PaymentRequest getPaymentRequest(String id)
getPaymentRequests
Link copied to clipboard
final List<PaymentRequestgetPaymentRequests()
pollDocument
Link copied to clipboard
final Document pollDocument(Document document)
Continually checks the document status (via the Gini API) until the document is fully processed.
reportDocument
Link copied to clipboard
final String reportDocument(Document document, String summary, String description)
Sends an error report for the given document to Gini.
resolvePaymentRequest
Link copied to clipboard
final ResolvedPayment resolvePaymentRequest(String requestId, ResolvePaymentInput resolvePaymentInput)
Mark a PaymentRequest as paid.
sendFeedback
Link copied to clipboard
final Document sendFeedback(Document document, Map<String, SpecificExtraction> specificExtractions, Map<String, CompoundExtraction> compoundExtractions)
Sends approved and conceivably corrected extractions for the given document.