public class DocumentClient extends AbstractClient<DocumentService> implements DocumentService
client, endpoint| Constructor and Description |
|---|
DocumentClient(String endpoint) |
DocumentClient(String endpoint,
int gzipThreshold,
boolean log,
int timeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkin(String sid,
long docId,
String comment,
String filename,
boolean release,
DataHandler content)
Checks in an existing document with the given identifier to create a new
version.
|
void |
checkin(String sid,
long docId,
String comment,
String filename,
boolean release,
File content) |
void |
checkout(String sid,
long docId)
Checkouts an existing document with the given identifier.
|
WSDocument |
create(String sid,
WSDocument document,
DataHandler content)
Create a new document.
|
WSDocument |
create(String sid,
WSDocument document,
File content) |
WSDocument |
createAlias(String sid,
long docId,
long folderId)
Create a new document alias for the given document id and inside the
given folder id.
|
void |
delete(String sid,
long docId)
Deletes an existing document with the given identifier.
|
WSDocument[] |
getAliases(String sid,
long docId)
Gets the aliases of the given document
|
DataHandler |
getContent(String sid,
long docId)
Gets the document content of an existing document with the given
identifier.
|
WSDocument |
getDocument(String sid,
long docId)
Gets document metadata of an existing document with the given identifier.
|
WSDocument |
getDocumentByCustomId(String sid,
String customId)
Gets document metadata of an existing document with the given custom identifier.
|
WSDocument[] |
getDocuments(String sid,
Long[] docIds)
Gets document metadata of a collection of existing documents with the
given identifiers.
|
WSDocument[] |
getRecentDocuments(String sid,
Integer max)
Lists of last modified documents of the current session's user.
|
DataHandler |
getVersionContent(String sid,
long docId,
String version)
Gets the document content of an existing document with the given
identifier.
|
WSDocument[] |
getVersions(String sid,
long docId)
Gets the version history of an existing document with the given
identifier.
|
boolean |
isReadable(String sid,
long docId)
Test if a document identifier is valid.
|
WSDocument[] |
list(String sid,
long folderId)
Deprecated.
|
WSDocument[] |
listDocuments(String sid,
long folderId,
String fileName)
Gets a document in a specific folder
|
void |
lock(String sid,
long docId)
Locks an existing document with the given identifier.
|
void |
move(String sid,
long docId,
long folderId)
Moves an existing document with the given identifier.
|
void |
reindex(String sid,
long docId)
Reindexes(or indexes) a document
|
void |
rename(String sid,
long docId,
String name)
Renames the title of an existing document with the given identifier.
|
void |
renameFile(String sid,
long docId,
String name)
Renames the filename of an existing document with the given identifier.
|
void |
restore(String sid,
long docId,
long folderId)
Restores an existing document with the given identifier.
|
void |
sendEmail(String sid,
Long[] docIds,
String recipients,
String subject,
String message)
Sends a set of documents as mail attachments
|
void |
unlock(String sid,
long docId)
Unlocks an existing document with the given identifier.
|
void |
update(String sid,
WSDocument document)
Updates an existing document with the value object containing the
document's metadata.
|
configureSSL, configureTimeout, initClientpublic DocumentClient(String endpoint, int gzipThreshold, boolean log, int timeout) throws IOException
IOExceptionpublic DocumentClient(String endpoint) throws IOException
IOExceptionpublic WSDocument create(String sid, WSDocument document, DataHandler content) throws Exception
DocumentServicecreate in interface DocumentServicesid - Session identifierdocument - Web service value object containing the document's
metadatacontent - The document's binary contentExceptionpublic WSDocument create(String sid, WSDocument document, File content) throws Exception
Exceptionpublic void checkout(String sid, long docId) throws Exception
DocumentServicecheckout in interface DocumentServicesid - Session identifierdocId - The document idExceptionpublic void delete(String sid, long docId) throws Exception
DocumentServicedelete in interface DocumentServicesid - Session identifierdocId - The document idExceptionpublic WSDocument getDocument(String sid, long docId) throws Exception
DocumentServicegetDocument in interface DocumentServicesid - Session identifierdocId - The document idExceptionpublic WSDocument getDocumentByCustomId(String sid, String customId) throws Exception
DocumentServicegetDocumentByCustomId in interface DocumentServicesid - Session identifiercustomId - The custom idExceptionpublic boolean isReadable(String sid, long docId) throws Exception
DocumentServiceisReadable in interface DocumentServicesid - Session identifierdocId - The document idExceptionpublic void lock(String sid, long docId) throws Exception
DocumentServicelock in interface DocumentServicesid - Session identifierdocId - The document idExceptionpublic void move(String sid, long docId, long folderId) throws Exception
DocumentServicemove in interface DocumentServicesid - Session identifierdocId - The document idfolderId - The folder id of the new document folderExceptionpublic void unlock(String sid, long docId) throws Exception
DocumentServiceunlock in interface DocumentServicesid - Session identifierdocId - The document idExceptionpublic void update(String sid, WSDocument document) throws Exception
DocumentServiceupdate in interface DocumentServicesid - Session identifierExceptionpublic void checkin(String sid, long docId, String comment, String filename, boolean release, DataHandler content) throws Exception
DocumentServicecheckin in interface DocumentServicesid - Session identifierdocId - The document idcomment - The check in operation commentfilename - The document file namerelease - True if this is a new release(eg: 2.0) rather than a
subversion(eg: 1.1)content - The document's binary contentExceptionpublic void checkin(String sid, long docId, String comment, String filename, boolean release, File content) throws Exception
Exception@Deprecated public WSDocument[] list(String sid, long folderId) throws Exception
DocumentServicelist in interface DocumentServicesid - Session identifierfolderId - The document idExceptionpublic DataHandler getContent(String sid, long docId) throws Exception
DocumentServicegetContent in interface DocumentServicesid - Session identifierdocId - The document idExceptionpublic DataHandler getVersionContent(String sid, long docId, String version) throws Exception
DocumentServicegetVersionContent in interface DocumentServicesid - Session identifierdocId - The document idversion - The specific version(it can be empty)Exceptionpublic WSDocument[] getVersions(String sid, long docId) throws Exception
DocumentServicegetVersions in interface DocumentServicesid - Session identifierdocId - The document idExceptionpublic void restore(String sid, long docId, long folderId) throws Exception
DocumentServicerestore in interface DocumentServicesid - Session identifierdocId - The document idfolderId - The target folder idExceptionpublic void rename(String sid, long docId, String name) throws Exception
DocumentServicerename in interface DocumentServicesid - Session identifierdocId - The document idname - The new document titleExceptionpublic WSDocument[] getDocuments(String sid, Long[] docIds) throws Exception
DocumentServicegetDocuments in interface DocumentServicesid - Session identifierdocIds - The documents idsExceptionpublic WSDocument[] getRecentDocuments(String sid, Integer max) throws Exception
DocumentServicegetRecentDocuments in interface DocumentServicesid - Session identifiermax - Maximum number of returned recordsExceptionpublic void sendEmail(String sid, Long[] docIds, String recipients, String subject, String message) throws Exception
DocumentServicesendEmail in interface DocumentServicesid - Session identifiersdocIds - Set of document idsrecipients - Set of recipients(comma separated)subject - The email subjectmessage - The email message bodyExceptionpublic WSDocument createAlias(String sid, long docId, long folderId) throws Exception
DocumentServicecreateAlias in interface DocumentServicesid - Session identifierdocId - The original document idfolderId - Identifier of the folder in which will be stored the
alias.Exceptionpublic void renameFile(String sid, long docId, String name) throws Exception
DocumentServicerenameFile in interface DocumentServicesid - Session identifierdocId - The document idname - The new document file nameExceptionpublic void reindex(String sid, long docId) throws Exception
DocumentServicereindex in interface DocumentServicesid - Session identifierdocId - The document idExceptionpublic WSDocument[] listDocuments(String sid, long folderId, String fileName) throws Exception
DocumentServicelistDocuments in interface DocumentServicesid - Session identifierfolderId - The folder idfileName - Optional file name filterExceptionpublic WSDocument[] getAliases(String sid, long docId) throws Exception
DocumentServicegetAliases in interface DocumentServicesid - Session identifierdocId - The master document IDExceptionCopyright © 2008-2014 Logical Objects. All Rights Reserved.