コード例 #1
0
 /** @see FileStoreService#delete(String) {@inheritDoc} */
 @Override
 public void delete(String url) throws Exception {
   SardineFactory.begin(USERNAME, PASSWORD).delete(rewrite(url));
 }
コード例 #2
0
 /** @see FileStoreService#createFolder(String) {@inheritDoc} */
 @Override
 public void createFolder(String url) throws Exception {
   SardineFactory.begin(USERNAME, PASSWORD).createDirectory(rewrite(url));
 }
コード例 #3
0
 /** @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);
 }
コード例 #4
0
 /** @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));
 }
コード例 #5
0
 /** @see FileStoreService#exists(String) {@inheritDoc} */
 @Override
 public boolean exists(String url) throws Exception {
   Sardine sardine = SardineFactory.begin(USERNAME, PASSWORD);
   return sardine.exists(rewrite(url));
 }
コード例 #6
0
 /** @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));
 }