public class

CustomServiceUtils

extends Object
java.lang.Object
   ↳ com.pdftron.collab.service.CustomServiceUtils

Summary

Public Constructors
CustomServiceUtils()
Public Methods
static void addAnnotation(CollabDatabase db, AnnotationEntity annotation)
From remote: add annotation Must run on background thread
static String addAnnotations(CollabDatabase db, HashMap<String, AnnotationEntity> annotations)
From remote: add annotations, commonly used for syncing initial annotations Must run on background thread
static void addDocument(CollabDatabase db, String documentId)
Set the current document Must run on background thread
static void addDocument(CollabDatabase db, DocumentEntity entity)
Set the current document Must run on background thread
static void addLastXfdf(CollabDatabase db, String xfdf)
Add the last XFDF command string to database
static void addUser(CollabDatabase db, String userId, String userName)
Add a user Must run on background thread
static void cleanup(CollabDatabase db)
Cleanup all local cache Must run on background thread
static void deleteAnnotation(CollabDatabase db, String annotId)
From remote: delete annotation Must run on background thread
static String getXfdfFile(String xfdf)
static String getXfdfFromFile(String filePath)
static void importAnnotationCommand(CollabDatabase db, String documentId, String xfdfCommand, boolean isInitialLoad)
Imports the XFDF command string to the document
static void importAnnotations(CollabDatabase db, String documentId, String xfdf, boolean isInitialLoad)
Imports the XFDF string to the document
static void modifyAnnotation(CollabDatabase db, AnnotationEntity annotation)
From remote: modify annotation Must run on background thread
static void setCurrentUser(CollabDatabase db, String userId, String userName)
Set the current user Must run on background thread
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CustomServiceUtils ()

Public Methods

public static void addAnnotation (CollabDatabase db, AnnotationEntity annotation)

From remote: add annotation Must run on background thread

Parameters
db the CollabDatabase
annotation the AnnotationEntity

public static String addAnnotations (CollabDatabase db, HashMap<String, AnnotationEntity> annotations)

From remote: add annotations, commonly used for syncing initial annotations Must run on background thread

Parameters
db the CollabDatabase
annotations map of key=id, value=AnnotationEntity

public static void addDocument (CollabDatabase db, String documentId)

Set the current document Must run on background thread

Parameters
db the CollabDatabase
documentId the unique identifier of the document

public static void addDocument (CollabDatabase db, DocumentEntity entity)

Set the current document Must run on background thread

Parameters
db the CollabDatabase
entity the DocumentEntity

public static void addLastXfdf (CollabDatabase db, String xfdf)

Add the last XFDF command string to database

Parameters
db the CollabDatabase
xfdf the XFDF command string

public static void addUser (CollabDatabase db, String userId, String userName)

Add a user Must run on background thread

Parameters
db the CollabDatabase
userId the unique identifier of the user
userName the name of the user

public static void cleanup (CollabDatabase db)

Cleanup all local cache Must run on background thread

public static void deleteAnnotation (CollabDatabase db, String annotId)

From remote: delete annotation Must run on background thread

Parameters
db the CollabDatabase
annotId the unique identification of the annotation

public static String getXfdfFile (String xfdf)

public static String getXfdfFromFile (String filePath)

public static void importAnnotationCommand (CollabDatabase db, String documentId, String xfdfCommand, boolean isInitialLoad)

Imports the XFDF command string to the document

Parameters
db the CollabDatabase
documentId the unique identification of the document
xfdfCommand the XFDF command string
isInitialLoad whether this is the initial load XFDF string

public static void importAnnotations (CollabDatabase db, String documentId, String xfdf, boolean isInitialLoad)

Imports the XFDF string to the document

Parameters
db the CollabDatabase
documentId the unique identification of the document
xfdf the XFDF string
isInitialLoad whether this is the initial load XFDF string

public static void modifyAnnotation (CollabDatabase db, AnnotationEntity annotation)

From remote: modify annotation Must run on background thread

Parameters
db the CollabDatabase
annotation the AnnotationEntity

public static void setCurrentUser (CollabDatabase db, String userId, String userName)

Set the current user Must run on background thread

Parameters
db the CollabDatabase
userId the unique identifier of the user
userName the name of the user