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, initClient
public DocumentClient(String endpoint, int gzipThreshold, boolean log, int timeout) throws IOException
IOException
public DocumentClient(String endpoint) throws IOException
IOException
public WSDocument create(String sid, WSDocument document, DataHandler content) throws Exception
DocumentService
create
in interface DocumentService
sid
- Session identifierdocument
- Web service value object containing the document's
metadatacontent
- The document's binary contentException
public WSDocument create(String sid, WSDocument document, File content) throws Exception
Exception
public void checkout(String sid, long docId) throws Exception
DocumentService
checkout
in interface DocumentService
sid
- Session identifierdocId
- The document idException
public void delete(String sid, long docId) throws Exception
DocumentService
delete
in interface DocumentService
sid
- Session identifierdocId
- The document idException
public WSDocument getDocument(String sid, long docId) throws Exception
DocumentService
getDocument
in interface DocumentService
sid
- Session identifierdocId
- The document idException
public WSDocument getDocumentByCustomId(String sid, String customId) throws Exception
DocumentService
getDocumentByCustomId
in interface DocumentService
sid
- Session identifiercustomId
- The custom idException
public boolean isReadable(String sid, long docId) throws Exception
DocumentService
isReadable
in interface DocumentService
sid
- Session identifierdocId
- The document idException
public void lock(String sid, long docId) throws Exception
DocumentService
lock
in interface DocumentService
sid
- Session identifierdocId
- The document idException
public void move(String sid, long docId, long folderId) throws Exception
DocumentService
move
in interface DocumentService
sid
- Session identifierdocId
- The document idfolderId
- The folder id of the new document folderException
public void unlock(String sid, long docId) throws Exception
DocumentService
unlock
in interface DocumentService
sid
- Session identifierdocId
- The document idException
public void update(String sid, WSDocument document) throws Exception
DocumentService
update
in interface DocumentService
sid
- Session identifierException
public void checkin(String sid, long docId, String comment, String filename, boolean release, DataHandler content) throws Exception
DocumentService
checkin
in interface DocumentService
sid
- 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 contentException
public 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
DocumentService
list
in interface DocumentService
sid
- Session identifierfolderId
- The document idException
public DataHandler getContent(String sid, long docId) throws Exception
DocumentService
getContent
in interface DocumentService
sid
- Session identifierdocId
- The document idException
public DataHandler getVersionContent(String sid, long docId, String version) throws Exception
DocumentService
getVersionContent
in interface DocumentService
sid
- Session identifierdocId
- The document idversion
- The specific version(it can be empty)Exception
public WSDocument[] getVersions(String sid, long docId) throws Exception
DocumentService
getVersions
in interface DocumentService
sid
- Session identifierdocId
- The document idException
public void restore(String sid, long docId, long folderId) throws Exception
DocumentService
restore
in interface DocumentService
sid
- Session identifierdocId
- The document idfolderId
- The target folder idException
public void rename(String sid, long docId, String name) throws Exception
DocumentService
rename
in interface DocumentService
sid
- Session identifierdocId
- The document idname
- The new document titleException
public WSDocument[] getDocuments(String sid, Long[] docIds) throws Exception
DocumentService
getDocuments
in interface DocumentService
sid
- Session identifierdocIds
- The documents idsException
public WSDocument[] getRecentDocuments(String sid, Integer max) throws Exception
DocumentService
getRecentDocuments
in interface DocumentService
sid
- Session identifiermax
- Maximum number of returned recordsException
public void sendEmail(String sid, Long[] docIds, String recipients, String subject, String message) throws Exception
DocumentService
sendEmail
in interface DocumentService
sid
- Session identifiersdocIds
- Set of document idsrecipients
- Set of recipients(comma separated)subject
- The email subjectmessage
- The email message bodyException
public WSDocument createAlias(String sid, long docId, long folderId) throws Exception
DocumentService
createAlias
in interface DocumentService
sid
- Session identifierdocId
- The original document idfolderId
- Identifier of the folder in which will be stored the
alias.Exception
public void renameFile(String sid, long docId, String name) throws Exception
DocumentService
renameFile
in interface DocumentService
sid
- Session identifierdocId
- The document idname
- The new document file nameException
public void reindex(String sid, long docId) throws Exception
DocumentService
reindex
in interface DocumentService
sid
- Session identifierdocId
- The document idException
public WSDocument[] listDocuments(String sid, long folderId, String fileName) throws Exception
DocumentService
listDocuments
in interface DocumentService
sid
- Session identifierfolderId
- The folder idfileName
- Optional file name filterException
public WSDocument[] getAliases(String sid, long docId) throws Exception
DocumentService
getAliases
in interface DocumentService
sid
- Session identifierdocId
- The master document IDException
Copyright © 2008-2014 Logical Objects. All Rights Reserved.