Search in sources :

Example 1 with RemoteEntries

use of org.jbei.ice.lib.net.RemoteEntries in project ice by JBEI.

the class FileResource method getRemoteAttachment.

@GET
@Path("remote/{id}/attachment/{fileId}")
public Response getRemoteAttachment(@PathParam("id") long partnerId, @PathParam("fileId") String fileId, @QueryParam("sid") String sid) {
    String userId = getUserId(sessionId);
    RemoteEntries entries = new RemoteEntries();
    File file = entries.getPublicAttachment(userId, partnerId, fileId);
    if (file == null)
        return respond(Response.Status.NOT_FOUND);
    return addHeaders(Response.ok(file), "remoteAttachment");
}
Also used : RemoteEntries(org.jbei.ice.lib.net.RemoteEntries) File(java.io.File)

Aggregations

File (java.io.File)1 RemoteEntries (org.jbei.ice.lib.net.RemoteEntries)1