@Path(value="/files") public class FilesResource extends Object
| Constructor and Description |
|---|
FilesResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
deleteFile(String id)
delete the file with given id
|
List<FileDescriptor> |
getAllFileDescriptors(int size,
int page)
get all file-descriptors
|
javax.ws.rs.core.Response |
getFile(String id)
get the file with given id
|
FileDescriptor |
getFileDescriptor(String id)
get a file-descriptor with given id
|
String |
getForm()
get a file-descriptor with given id
|
FileDescriptor |
uploadFile(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input)
upload a file
|
@GET @Produces(value="application/json") public List<FileDescriptor> getAllFileDescriptors(@QueryParam(value="size")@DefaultValue(value="100") int size, @QueryParam(value="page")@DefaultValue(value="0") int page)
@GET @Path(value="form") @Produces(value="text/html") public String getForm()
id - file-desciptor id@GET
@Path(value="{id}")
@Produces(value="application/json")
public FileDescriptor getFileDescriptor(@PathParam(value="id")
String id)
id - file-desciptor id@GET
@Path(value="{id}/file")
@Produces(value="application/octet-stream")
public javax.ws.rs.core.Response getFile(@PathParam(value="id")
String id)
id - file-descriptor id@POST @Consumes(value="multipart/form-data") @Produces(value="application/json") public FileDescriptor uploadFile(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input) throws IOException
input - form data with file and other informationIOException@DELETE
@Path(value="{id}")
public javax.ws.rs.core.Response deleteFile(@PathParam(value="id")
String id)
id - file-descriptor idCopyright © 2017. All rights reserved.