Package com.logicaldoc.zoho
Class Zoho
- java.lang.Object
-
- com.logicaldoc.zoho.Zoho
-
public class Zoho extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
create(String filename, String folderId)
Creates a new document in Zoho.com.logicaldoc.gui.common.client.beans.GUIDocument
createFolder(String name, String parentId)
void
delete(String docId)
void
download(String docId, File out)
com.logicaldoc.gui.common.client.beans.GUIDocument
getDocument(String docId)
List<com.logicaldoc.gui.common.client.beans.GUIDocument>
list(String parentId)
Retrieves the folders and files children of a given parent.static void
main(String[] args)
String
uploadFile(String filename, File file, String folderId)
String
uploadFile(String filename, InputStream content, String folderId)
-
-
-
Constructor Detail
-
Zoho
public Zoho(String authtoken)
-
-
Method Detail
-
main
public static void main(String[] args) throws FileNotFoundException, ZohoException
- Throws:
FileNotFoundException
ZohoException
-
uploadFile
public String uploadFile(String filename, File file, String folderId) throws ZohoException
- Throws:
ZohoException
-
delete
public void delete(String docId) throws ZohoException
- Throws:
ZohoException
-
create
public String[] create(String filename, String folderId) throws ZohoException
Creates a new document in Zoho.- Parameters:
filename
- The file namefolderId
- The parent folder ID- Returns:
- the ID of the new document and the URL to open
- Throws:
ZohoException
- error in the Zoho server
-
uploadFile
public String uploadFile(String filename, InputStream content, String folderId) throws ZohoException
- Throws:
ZohoException
-
createFolder
public com.logicaldoc.gui.common.client.beans.GUIDocument createFolder(String name, String parentId) throws ZohoException
- Throws:
ZohoException
-
download
public void download(String docId, File out) throws ZohoException
- Throws:
ZohoException
-
getDocument
public com.logicaldoc.gui.common.client.beans.GUIDocument getDocument(String docId) throws ZohoException
- Throws:
ZohoException
-
list
public List<com.logicaldoc.gui.common.client.beans.GUIDocument> list(String parentId) throws ZohoException
Retrieves the folders and files children of a given parent. The property description stores the Zoho ID- Parameters:
parentId
- identifier of the parent folder- Returns:
- list of documents
- Throws:
ZohoException
- error in the Zoho server
-
-