vpasquier
3/27/2015 - 10:51 AM

gistfile1.java

@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;