public class DataStoreService
extends java.lang.Object
| Constructor and Description |
|---|
DataStoreService(org.apache.http.client.HttpClient httpClient,
org.springframework.web.client.RestTemplate restTemplate,
GdcService gdcService,
java.lang.String gdcUri)
Creates new DataStoreService
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(java.lang.String path)
Delete given path from datastore.
|
java.io.InputStream |
download(java.lang.String path)
Download given path and return data as stream
|
java.net.URI |
getUri(java.lang.String path)
Returns uri for given path (which is used by this service for upload, download or delete)
|
void |
upload(java.lang.String path,
java.io.InputStream stream)
Uploads given stream to given datastore path
|
public DataStoreService(org.apache.http.client.HttpClient httpClient,
org.springframework.web.client.RestTemplate restTemplate,
GdcService gdcService,
java.lang.String gdcUri)
httpClient - httpClient to make datastore connectionrestTemplate - restTemplate to make datastore connectiongdcService - used to obtain datastore URIgdcUri - complete GDC URI used to prefix possibly relative datastore pathpublic java.net.URI getUri(java.lang.String path)
path - path the uri is constructed forpublic void upload(java.lang.String path,
java.io.InputStream stream)
path - path where to upload tostream - stream to uploadDataStoreException - in case upload failedpublic java.io.InputStream download(java.lang.String path)
path - path from where to downloadDataStoreException - in case download failedpublic void delete(java.lang.String path)
path - path to deleteDataStoreException - in case delete failedCopyright © 2016. All Rights Reserved.