@Component(value="downloadService") public class DownloadService extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
biocacheMediaDir |
static String |
biocacheMediaUrl |
protected Boolean |
citationsEnabled |
protected String |
citationServiceUrl |
protected int |
concurrentDownloads
Number of threads to perform to offline downloads on can be configured.
|
protected PersistentQueueDAO |
persistentQueueDAO |
protected String |
registryUrl |
protected String |
webservicesRoot |
| Constructor and Description |
|---|
DownloadService() |
| Modifier and Type | Method and Description |
|---|---|
void |
getCitations(Map<String,Integer> uidStats,
OutputStream out,
char sep,
char esc)
get citation info from citation web service and write it into citation.txt file.
|
List<DownloadDetailsDTO> |
getCurrentDownloads()
Returns a list of current downloads
|
void |
init() |
DownloadDetailsDTO |
registerDownload(DownloadRequestParams requestParams,
String ip,
DownloadDetailsDTO.DownloadType type)
Registers a new active download
|
void |
unregisterDownload(DownloadDetailsDTO dd)
Removes a completed download from active list.
|
void |
writeQueryToStream(DownloadRequestParams requestParams,
javax.servlet.http.HttpServletResponse response,
String ip,
javax.servlet.ServletOutputStream out,
boolean includeSensitive,
boolean fromIndex) |
protected int concurrentDownloads
@Inject protected PersistentQueueDAO persistentQueueDAO
protected String webservicesRoot
protected Boolean citationsEnabled
protected String registryUrl
protected String citationServiceUrl
public static String biocacheMediaUrl
public static String biocacheMediaDir
@PostConstruct public void init()
public DownloadDetailsDTO registerDownload(DownloadRequestParams requestParams, String ip, DownloadDetailsDTO.DownloadType type)
requestParams - ip - type - public void unregisterDownload(DownloadDetailsDTO dd)
dd - public List<DownloadDetailsDTO> getCurrentDownloads()
public void writeQueryToStream(DownloadRequestParams requestParams, javax.servlet.http.HttpServletResponse response, String ip, javax.servlet.ServletOutputStream out, boolean includeSensitive, boolean fromIndex) throws Exception
Exceptionpublic void getCitations(Map<String,Integer> uidStats, OutputStream out, char sep, char esc) throws IOException
uidStats - out - org.apache.commons.httpclient.HttpExceptionIOExceptionCopyright © 2014. All rights reserved.