public class

DatabaseSignatureStorage

extends Object
implements SignatureStorage
java.lang.Object
   ↳ com.pspdfkit.signatures.storage.DatabaseSignatureStorage

Class Overview

Our default SignatureStorage implementation that uses the SQLite database to store signatures.

Summary

Public Methods
void addSignature(Signature signature)
Adds the given signature to the signature storage.
void addSignatures(List<Signature> signatures)
Adds the given signatures to the signature storage.
void clear()
Clear all the entries from the database.
void deleteDatabase(Context context)
Deletes the database used by this signature storage.
List<Signature> getSignatures()
Gets the currently stored signatures.
void removeSignature(Signature signature)
Removes the given signature from the signature storage.
void removeSignatures(List<Signature> signatures)
Removes the given signatures from the signature storage.
static DatabaseSignatureStorage withName(Context context, String databaseName)
Creates a new DatabaseSignatureStorage with provided database name.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pspdfkit.signatures.storage.SignatureStorage

Public Methods

public void addSignature (Signature signature)

Adds the given signature to the signature storage.

Parameters
signature Signature to add.

public void addSignatures (List<Signature> signatures)

Adds the given signatures to the signature storage.

Parameters
signatures List of signatures to add.

public void clear ()

Clear all the entries from the database.

Throws
SQLException

public void deleteDatabase (Context context)

Deletes the database used by this signature storage.

Parameters
context Context used to access the database.

public List<Signature> getSignatures ()

Gets the currently stored signatures.

Returns
  • List of signatures currently in the storage.

public void removeSignature (Signature signature)

Removes the given signature from the signature storage.

Parameters
signature Signature to remove.

public void removeSignatures (List<Signature> signatures)

Removes the given signatures from the signature storage.

Parameters
signatures List of signatures to remove.

public static DatabaseSignatureStorage withName (Context context, String databaseName)

Creates a new DatabaseSignatureStorage with provided database name.

Parameters
context Context of the calling component.
databaseName Database name to use for this storage.
Returns
  • A signature storage using SQLite database with the provided name.