#79: Resource to generate a dynamic CSS

This commit is contained in:
jendib
2016-04-09 21:23:55 +02:00
parent 274512a58e
commit 8ad9c529b6
4 changed files with 52 additions and 0 deletions
@@ -0,0 +1,29 @@
package com.sismics.docs.rest.resource;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;
/**
* Theme REST resources.
*
* @author bgamard
*/
@Path("/theme")
public class ThemeResource extends BaseResource {
/**
* Returns custom CSS stylesheet.
*
* @return Response
*/
@GET
@Path("/stylesheet")
@Produces("text/css")
public Response stylesheet() {
StringBuilder sb = new StringBuilder();
sb.append("body {\n");
sb.append("}");
return Response.ok().entity(sb.toString()).build();
}
}