@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.Request request) |
javax.ws.rs.core.Response |
file(String filePath,
String version,
javax.ws.rs.core.Request request) |
javax.ws.rs.core.Response |
info(String filePath,
javax.ws.rs.core.Request request) |
Object |
set(String filePath,
int defaultVersion,
javax.ws.rs.core.Request request) |
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 javax.ws.rs.core.Response info(@PathParam(value="filePath")
String filePath,
@Context
javax.ws.rs.core.Request request)
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,
@Context
javax.ws.rs.core.Request request)
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,
@Context
javax.ws.rs.core.Request request)
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,
@Context
javax.ws.rs.core.Request request)
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 © 2021 LSST. All rights reserved.