Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.crocodoc.ws.implementacao; import com.crocodoc.CrocodocDocument; import com.crocodoc.CrocodocDownload; import com.crocodoc.CrocodocException; import com.crocodoc.CrocodocSession; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.http.HttpEntity; /** * * @author felip */ public class WebServicesCrocoDoc implements InterfaceWSCrocodoc { @Override public Boolean delete(String uuid) { try { return CrocodocDocument.delete(uuid); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public Map<String, Object> status(String uuid) { try { return CrocodocDocument.status(uuid); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public ArrayList<Map<String, Object>> status(ArrayList<String> uuids) { try { return CrocodocDocument.status(uuids); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public String upload(String url) { try { return CrocodocDocument.upload(url); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public String upload(File file) { try { return CrocodocDocument.upload(file); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public HttpEntity document(String uuid) { try { CrocodocDownload.document(uuid); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public HttpEntity document(String uuid, Boolean isPdf, Boolean isAnnotated) { try { return CrocodocDownload.document(uuid, isPdf, isAnnotated); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public HttpEntity document(String uuid, Boolean isPdf, Boolean isAnnotated, List<String> filter) { try { return CrocodocDownload.document(uuid, isPdf, isAnnotated, filter); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public HttpEntity document(String uuid, Boolean isPdf, Boolean isAnnotated, String filter) { try { return CrocodocDownload.document(uuid, isPdf, isAnnotated, filter); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public HttpEntity text(String uuid) { try { return CrocodocDownload.text(uuid); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public HttpEntity thumbnail(String uuid) { try { return CrocodocDownload.thumbnail(uuid); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public HttpEntity thumbnail(String uuid, String size) { try { return CrocodocDownload.thumbnail(uuid, size); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public String create(String uuid) { try { return CrocodocSession.create(uuid); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } @Override public String create(String uuid, Map<String, Object> params) { try { return CrocodocSession.create(uuid, params); } catch (CrocodocException ex) { Logger.getLogger(WebServicesCrocoDoc.class.getName()).log(Level.SEVERE, null, ex); } return null; } }