public class

DataRepository

extends Object
java.lang.Object
   ↳ com.pdftron.collab.DataRepository

Class Overview

Repository handling the work with documents and annotations.

Summary

Public Methods
Completable addDocumentUnread(String docId, String annotId)
Updates unread count for the document rxjava version
void addDocumentUnreadImpl(String docId, String annotId)
Update unread count for the document Must run on background thread
Completable consumeLastAnnotations(ArrayList<String> ids)
void consumeLastAnnotationsImpl(ArrayList<String> ids)
getAnnotation(String annotationId)
Get annotation by id
getAnnotations(String documentId)
Get all annotations associated with a document
getDocument()
Get the active document
static DataRepository getInstance(Application application)
getLastAnnotations()
Get the last annotation
getReplies(String annotationId)
Get all annotation replies associated with an annotation
getReplyReviewState(String annotationId)
Gets the annotation reply that indicates the review state of an annotation
getUser()
Get the active user
Completable removeDocumentUnread(String docId, String annotId)
Updates unread count rxjava version
void removeDocumentUnreadImpl(String docId, String annotId)
Updates unread count Must run on background thread
void sendAnnotation(String action, String xfdfCommand, String xfdfJSON, String documentId, String userName)
Called when client has new annotation events Must run on a background thread.
void setCustomService(CustomService connection)
Link to your choice of backend service
Completable updateActiveAnnotation(String userId, String annotId)
Updates current active annotation rxjava version
void updateActiveAnnotationImpl(String userId, String annotId)
Updates current active annotation Must run on background thread
Completable updateAnnotationUnreads(String annotId)
Updates last read timestamp for an annotation rxjava version
void updateAnnotationUnreadsImpl(String annotId)
Updates last read timestamp for an annotation Must run on background thread
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public Completable addDocumentUnread (String docId, String annotId)

Updates unread count for the document rxjava version

Parameters
docId the document id
annotId the annotation id

public void addDocumentUnreadImpl (String docId, String annotId)

Update unread count for the document Must run on background thread

Parameters
docId the document id
annotId the annotation id
Throws
JSONException

public Completable consumeLastAnnotations (ArrayList<String> ids)

public void consumeLastAnnotationsImpl (ArrayList<String> ids)

public getAnnotation (String annotationId)

Get annotation by id

Parameters
annotationId the annotation unique identifier

public getAnnotations (String documentId)

Get all annotations associated with a document

Parameters
documentId the document unique identifier

public getDocument ()

Get the active document

public static DataRepository getInstance (Application application)

public getLastAnnotations ()

Get the last annotation

public getReplies (String annotationId)

Get all annotation replies associated with an annotation

Parameters
annotationId the annotation unique identifier

public getReplyReviewState (String annotationId)

Gets the annotation reply that indicates the review state of an annotation

Parameters
annotationId the annotation unique identifier

public getUser ()

Get the active user

public Completable removeDocumentUnread (String docId, String annotId)

Updates unread count rxjava version

Parameters
docId the document id
annotId the annotation id

public void removeDocumentUnreadImpl (String docId, String annotId)

Updates unread count Must run on background thread

Parameters
docId the document id
annotId the annotation id
Throws
JSONException

public void sendAnnotation (String action, String xfdfCommand, String xfdfJSON, String documentId, String userName)

Called when client has new annotation events Must run on a background thread.

Parameters
action one of add/modify/delete
xfdfCommand the annotation XFDF command string
xfdfJSON the annotation XFDF information
documentId the document identifier
userName optional user name, user unique identifier should be part of the XFDF command instead

public void setCustomService (CustomService connection)

Link to your choice of backend service

Parameters
connection the backend service

public Completable updateActiveAnnotation (String userId, String annotId)

Updates current active annotation rxjava version

Parameters
userId the user id
annotId the active annotation id

public void updateActiveAnnotationImpl (String userId, String annotId)

Updates current active annotation Must run on background thread

Parameters
userId the user id
annotId the active annotation id

public Completable updateAnnotationUnreads (String annotId)

Updates last read timestamp for an annotation rxjava version

Parameters
annotId the annotation id

public void updateAnnotationUnreadsImpl (String annotId)

Updates last read timestamp for an annotation Must run on background thread

Parameters
annotId the annotation id