com.pdftron.collab.service.CustomService |
Known Indirect Subclasses |
Interface for functions required to observe incoming and outgoing annotation changes. Default implementation is provided for merging incoming changes.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
addAnnotation(CollabDatabase db, AnnotationEntity annotation)
From remote: add annotation
Must run on background thread
| ||||||||||
abstract void |
addAnnotations(CollabDatabase db, HashMap<String, AnnotationEntity> annotations)
From remote: add annotations, commonly used for syncing initial annotations
Must run on background thread
| ||||||||||
abstract void |
addDocument(CollabDatabase db, String documentId)
Set current document
Must run on background thread
| ||||||||||
abstract void |
addDocument(CollabDatabase db, DocumentEntity entity)
Set current document
Must run on background thread
| ||||||||||
abstract void |
addUser(CollabDatabase db, String userId, String userName)
Add a user
Must run on background thread
| ||||||||||
abstract void |
cleanup(CollabDatabase db)
Cleanup all local cache
Must run on background thread
| ||||||||||
abstract void |
deleteAnnotation(CollabDatabase db, AnnotationEntity annotation)
From remote: delete annotation
Must run on background thread
| ||||||||||
abstract void |
deleteAnnotation(CollabDatabase db, String annotId)
From remote: delete annotation
Must run on background thread
| ||||||||||
abstract void |
importAnnotationCommand(CollabDatabase db, String documentId, String xfdfCommand, boolean isInitialLoad)
Imports the XFDF command string to the document
| ||||||||||
abstract void |
importAnnotations(CollabDatabase db, String documentId, String xfdf, boolean isInitialLoad)
Imports the XFDF string to the document
| ||||||||||
abstract void |
modifyAnnotation(CollabDatabase db, AnnotationEntity annotation)
From remote: modify annotation
Must run on background thread
| ||||||||||
abstract void |
sendAnnotation(String action, String xfdfCommand, ArrayList<AnnotationEntity> annotations, String documentId, String userName)
Send local change
| ||||||||||
abstract void |
setCurrentUser(CollabDatabase db, String userId, String userName)
Set the current user
Must run on background thread
|
From remote: add annotation Must run on background thread
db | the CollabDatabase |
---|---|
annotation | the AnnotationEntity
|
From remote: add annotations, commonly used for syncing initial annotations Must run on background thread
db | the CollabDatabase |
---|---|
annotations | map of key=id, value=AnnotationEntity
|
Set current document Must run on background thread
db | the CollabDatabase |
---|---|
documentId | the unique identifier of the document |
Set current document Must run on background thread
db | the CollabDatabase |
---|---|
entity | the DocumentEntity
|
Add a user Must run on background thread
db | the CollabDatabase |
---|---|
userId | the unique identifier of the user |
userName | the name of the user |
Cleanup all local cache Must run on background thread
From remote: delete annotation Must run on background thread
db | the CollabDatabase |
---|---|
annotation | the AnnotationEntity
|
From remote: delete annotation Must run on background thread
db | the CollabDatabase |
---|---|
annotId | the unique identification of the annotation |
Imports the XFDF command string to the document
db | the CollabDatabase |
---|---|
documentId | the unique identification of the document |
xfdfCommand | the XFDF command string |
isInitialLoad | whether this is the initial load XFDF string |
Imports the XFDF string to the document
db | the CollabDatabase |
---|---|
documentId | the unique identification of the document |
xfdf | the XFDF string |
isInitialLoad | whether this is the initial load XFDF string |
From remote: modify annotation Must run on background thread
db | the CollabDatabase |
---|---|
annotation | the AnnotationEntity
|
Send local change
action | one of add/modify/delete |
---|---|
xfdfCommand | the annotation XFDF command string |
annotations | the annotation XFDF information |
documentId | the document identifier |
userName | optional user name, user unique identifier should be part of the XFDF command instead |
Set the current user Must run on background thread
db | the CollabDatabase |
---|---|
userId | the unique identifier of the user |
userName | the name of the user |