Skip to main content

BIDDocumentProvider

public class BIDDocumentProvider extends Object

↳ package com.onekosmos.blockid.sdk.document


This class is responsible for all document management, such as adding and removing identity documents, and other miscellaneous documents.

Enum Values​

TypeNameDescription
RegisterDocCategoryidentity_documentA value to represent a document as an identity document
RegisterDocCategorymisc_documentA value to represent a document as a miscellaneous document

Method Summary​

TypeNameDescription
booleancheckUserDocumentExist(LinkedHashMap<String, Object> documentMap)Checks and returns if the given document is already available in BlockID blockchain platform
intgetDocumentCount()Returns enrolled document count
StringgetEnrolledDocumentList()Returns the list of all documents.
static BIDDocumentProvidergetInstance()Returns an instance of BIDDocumentProvider.
StringgetUserDocument(@Nullable String id, @Nullable String type, @Nullable String category)Checks and returns document based on given criteria. All or any of the input parameter can be NULL. If all the parameter will be NULL, the method returns list of all documents registered
booleanisDocumentEnrolled(String type, String category)Checks and returns if the document is registered based on given type and category

Method Detail​

checkUserDocumentExist​

public boolean checkUserDocumentExist(LinkedHashMap<String, Object> documentMap)

  • Checks and returns if the given document is already available in BlockID blockchain platform.
Parameters
documentMapLinkedHashMap<String, Object>: The document to be looked up

getDocumentCount​

public int getDocumentCount()

  • Returns enrolled document count.

getEnrolledDocumentList​

public String getEnrolledDocumentList()

  • Returns the list of all documents.

getInstance​

public static synchronized BIDDocumentProvider getInstance()

  • Returns an instance of BIDDocumentProvider.

getUserDocument​

public String getUserDocument(@Nullable String id, @Nullable String type, @Nullable String category)

  • Checks and returns document based on given criteria. All or any of the input parameter can be NULL. If all the parameter will be NULL, the method returns list of all documents registered.
Parameters
idString: The number for which the user has requested the document
typeString: The type of document (DL, PPT, etc.).
categoryString: The category of document (identity_document, misc_document)

isDocumentEnrolled​

public boolean isDocumentEnrolled(String type, String category)

  • Checks and returns if the document is registered based on given type and category.
Parameters
typeString: The type of document (DL, PPT, etc.).
categoryString: The category of document (identity_document, misc_document)