public class AttachmentsResource extends Object
| Constructor and Description |
|---|
AttachmentsResource()
Creates a new instance of AttachmentsResource
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addAttachment(javax.servlet.http.HttpServletRequest req,
javax.ws.rs.core.HttpHeaders headers,
Long logId,
InputStream uploadedInputStream,
com.sun.jersey.core.header.FormDataContentDisposition disposition,
com.sun.jersey.multipart.FormDataBodyPart body)
POST method for adding a new Attachment to a log entry.
|
javax.ws.rs.core.Response |
addReplaceAttachment(javax.servlet.http.HttpServletRequest req,
javax.ws.rs.core.HttpHeaders headers,
String fileName,
Long logId,
InputStream uploadedInputStream,
com.sun.jersey.core.header.FormDataContentDisposition disposition,
com.sun.jersey.multipart.FormDataBodyPart body)
PUT method for adding a new Attachment to a log entry.
|
javax.ws.rs.core.Response |
getFile(Long logId,
String fileName)
GET method for retrieving the list of attachments for a given log.
|
javax.ws.rs.core.Response |
getThumbnail(Long logId,
String fileName)
GET method for retrieving the list of attachments for a given log.
|
javax.ws.rs.core.Response |
read(Long logId)
GET method for retrieving attachments identified by id.
|
javax.ws.rs.core.Response |
removeAttachment(javax.servlet.http.HttpServletRequest req,
javax.ws.rs.core.HttpHeaders headers,
String fileName,
Long logId)
DELETE method for removing an attachment from a log entry.
|
public AttachmentsResource()
public javax.ws.rs.core.Response read(Long logId) throws UnsupportedEncodingException, NoSuchAlgorithmException
logId - log idUnsupportedEncodingExceptionNoSuchAlgorithmExceptionpublic javax.ws.rs.core.Response getFile(Long logId, String fileName)
public javax.ws.rs.core.Response getThumbnail(Long logId, String fileName)
public javax.ws.rs.core.Response addAttachment(@Context
javax.servlet.http.HttpServletRequest req,
@Context
javax.ws.rs.core.HttpHeaders headers,
Long logId,
InputStream uploadedInputStream,
com.sun.jersey.core.header.FormDataContentDisposition disposition,
com.sun.jersey.multipart.FormDataBodyPart body)
throws UnsupportedEncodingException,
NoSuchAlgorithmException
Long - logId the id of the log entry that the property is being added todata - the MULTIPART_FORM_DATA containing attachment and values to be added to be associated with the log entryUnsupportedEncodingExceptionNoSuchAlgorithmExceptionpublic javax.ws.rs.core.Response addReplaceAttachment(@Context
javax.servlet.http.HttpServletRequest req,
@Context
javax.ws.rs.core.HttpHeaders headers,
String fileName,
Long logId,
InputStream uploadedInputStream,
com.sun.jersey.core.header.FormDataContentDisposition disposition,
com.sun.jersey.multipart.FormDataBodyPart body)
throws UnsupportedEncodingException,
NoSuchAlgorithmException
String - fileName the fileName of the file being addedLong - logId the id of the log entry that the property is being added todata - the MULTIPART_FORM_DATA containing attachment and values to be added to be associated with the log entryUnsupportedEncodingExceptionNoSuchAlgorithmExceptionpublic javax.ws.rs.core.Response removeAttachment(@Context
javax.servlet.http.HttpServletRequest req,
@Context
javax.ws.rs.core.HttpHeaders headers,
String fileName,
Long logId)
throws UnsupportedEncodingException,
NoSuchAlgorithmException
String - attachment being deletedLong - logId the id of the log entry that the property is being added toUnsupportedEncodingExceptionNoSuchAlgorithmExceptionCopyright © 2010-2014 Michigan State University. All Rights Reserved.