public class DataStoreService extends Object
| Constructor and Description |
|---|
DataStoreService(org.apache.http.impl.client.HttpClientBuilder httClientBuilder,
GdcService gdcService,
String gdcUri,
String user,
String pass)
Creates new DataStoreService
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String path)
Delete given path from datastore.
|
InputStream |
download(String path)
Download given path and return data as stream
|
void |
upload(String path,
InputStream stream)
Uploads given stream to given datastore path
|
public DataStoreService(org.apache.http.impl.client.HttpClientBuilder httClientBuilder,
GdcService gdcService,
String gdcUri,
String user,
String pass)
httClientBuilder - httpClientBuilder to build datastore connectiongdcService - used to obtain datastore URIgdcUri - complete GDC URI used to prefix possibly relative datastore pathuser - datastore userpass - datastore passwordpublic void upload(String path, InputStream stream)
path - path where to upload tostream - stream to uploadDataStoreException - in case upload failedpublic InputStream download(String path)
path - path from where to downloadDataStoreException - in case download failedpublic void delete(String path)
path - path to deleteDataStoreException - in case delete failedCopyright © 2014. All Rights Reserved.