/** @see FileStoreService#delete(String) {@inheritDoc} */ @Override public void delete(String url) throws Exception { SardineFactory.begin(USERNAME, PASSWORD).delete(rewrite(url)); }
/** @see FileStoreService#createFolder(String) {@inheritDoc} */ @Override public void createFolder(String url) throws Exception { SardineFactory.begin(USERNAME, PASSWORD).createDirectory(rewrite(url)); }
/** @see FileStoreService#put(String, byte[], String) {@inheritDoc} */ @Override public void put(String url, byte[] data, String contentType) throws Exception { SardineFactory.begin(USERNAME, PASSWORD).put(rewrite(url), data, contentType); }
/** @see FileStoreService#getFile(String) {@inheritDoc} */ @Override public InputStream getFile(String url) throws Exception { Sardine sardine = SardineFactory.begin(USERNAME, PASSWORD); LOGGER.info("Getting DAV file from url=" + url + " rewritten as " + rewrite(url)); return sardine.get(rewrite(url)); }
/** @see FileStoreService#exists(String) {@inheritDoc} */ @Override public boolean exists(String url) throws Exception { Sardine sardine = SardineFactory.begin(USERNAME, PASSWORD); return sardine.exists(rewrite(url)); }
/** @see FileStoreService#list(String) {@inheritDoc} */ @Override public List<DavResource> list(String folderLocation) throws Exception { Sardine sardine = SardineFactory.begin(USERNAME, PASSWORD); return sardine.list(rewrite(folderLocation)); }