use of org.jbei.ice.lib.net.RemoteEntriesAsCSV in project ice by JBEI.
the class WebResource method getWebEntries.
@GET
@Path("/entries")
public Response getWebEntries(@QueryParam("download") boolean download, @QueryParam("limit") int limit, @QueryParam("offset") int offset) {
String userId = requireUserId();
log(userId, "downloading web entries");
RemoteEntriesAsCSV remoteEntriesAsCSV = new RemoteEntriesAsCSV(true);
remoteEntriesAsCSV.getEntries(offset, limit);
final File file = remoteEntriesAsCSV.getFilePath().toFile();
if (file.exists()) {
return Response.ok(new Setting("fileName", file.getName())).build();
}
return super.respond(false);
}
Aggregations