Skip to content

Instantly share code, notes, and snippets.

@vpasquier
Created March 27, 2015 10:51
Show Gist options
  • Save vpasquier/3db4aac4716ca172ecc7 to your computer and use it in GitHub Desktop.
Save vpasquier/3db4aac4716ca172ecc7 to your computer and use it in GitHub Desktop.
@Provider
@Produces({ "application/json+custom" })
public class CustomJsonDocumentListWriter extends JsonDocumentListWriter {
private static final Log log = LogFactory.getLog(CustomJsonDocumentListWriter.class);
@Context
JsonFactory factory;
@Context
protected HttpHeaders headers;
@Context
protected HttpServletRequest request;
@Override
protected String getEntityType() {
return "documents";
}
et
@Provider
@Produces({ "application/json+custom" })
public class CustomJsonDocumentWriter extends JsonDocumentWriter {
public static final String DOCUMENT_PROPERTIES_HEADER = "X-NXDocumentProperties";
private static final Log log = LogFactory.getLog(CustomJsonDocumentWriter.class);
@Context
JsonFactory factory;
@Context
protected HttpHeaders headers;
@Context
private HttpServletRequest servletRequest;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment