@Path(value="version") @Produces(value="application/json") public class VersionedFileServer extends Object
| Constructor and Description |
|---|
VersionedFileServer() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
deleteFile(String filePath) |
javax.ws.rs.core.Response |
diff(String filePath,
String v1,
String v2) |
javax.ws.rs.core.Response |
file(String filePath,
String version) |
Object |
info(String filePath) |
Object |
set(String filePath,
int defaultVersion) |
void |
setServletContext(javax.servlet.ServletContext context) |
Object |
upload(String filePath,
byte[] content) |
@Context
public void setServletContext(javax.servlet.ServletContext context)
throws IOException
IOException@GET
@Path(value="info/{filePath: .*}")
public Object info(@PathParam(value="filePath")
String filePath)
throws IOException
IOException@GET
@Path(value="download/{filePath: .*}")
@Produces(value="application/octet-stream")
public javax.ws.rs.core.Response file(@PathParam(value="filePath")
String filePath,
@QueryParam(value="version")
String version)
throws IOException
IOException@GET
@Path(value="diff/{filePath: .*}")
@Produces(value="application/octet-stream")
public javax.ws.rs.core.Response diff(@PathParam(value="filePath")
String filePath,
@QueryParam(value="v1")
String v1,
@QueryParam(value="v2")
String v2)
throws IOException,
com.github.difflib.algorithm.DiffException
IOExceptioncom.github.difflib.algorithm.DiffException@PUT
@Path(value="set/{filePath: .*}")
@Consumes(value="application/json")
public Object set(@PathParam(value="filePath")
String filePath,
int defaultVersion)
throws IOException
IOException@POST
@Path(value="upload/{filePath: .*}")
@Consumes(value="application/octet-stream")
public Object upload(@PathParam(value="filePath")
String filePath,
byte[] content)
throws IOException
IOException@DELETE
@Path(value="deleteFile/{filePath: .*}")
public javax.ws.rs.core.Response deleteFile(@PathParam(value="filePath")
String filePath)
throws IOException
IOExceptionCopyright © 2020 LSST. All rights reserved.