Package net.gini.android
Class DocumentMetadata
- java.lang.Object
-
- net.gini.android.DocumentMetadata
-
public class DocumentMetadata extends java.lang.ObjectUse this class to pass additional information for a document when uploading it to the Gini API.Besides the predefined metadata fields you may also add custom fields.
-
-
Constructor Summary
Constructors Constructor Description DocumentMetadata()Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String name, java.lang.String value)Add a custom metadata field.voidsetBranchId(java.lang.String branchId)Set a branch identifier to associate the document with a particular branch.
-
-
-
Method Detail
-
setBranchId
public void setBranchId(@NonNull java.lang.String branchId) throws java.lang.IllegalArgumentExceptionSet a branch identifier to associate the document with a particular branch.- Parameters:
branchId- an identifier as an ASCII compatible string- Throws:
java.lang.IllegalArgumentException- if the branchId string cannot be encoded as ASCII
-
add
public void add(@NonNull java.lang.String name, @NonNull java.lang.String value) throws java.lang.IllegalArgumentExceptionAdd a custom metadata field. If there is already a field with the same name, the previous value will be overwritten with this one.- Parameters:
name- field name as an ASCII compatible stringvalue- field value as an ASCII compatible string- Throws:
java.lang.IllegalArgumentException- if the name or the value cannot be encoded as ASCII
-
-