Explorar el Código

revert

tags/2.0.1
Jonathan Cobb hace 4 años
padre
commit
47b03e4b00
Se han modificado 1 ficheros con 3 adiciones y 7 borrados
  1. +3
    -7
      wizard-server/src/main/java/org/cobbzilla/wizard/resources/ResourceUtil.java

+ 3
- 7
wizard-server/src/main/java/org/cobbzilla/wizard/resources/ResourceUtil.java Ver fichero

@@ -37,19 +37,15 @@ import static org.cobbzilla.util.string.StringUtil.UTF8;
@Slf4j
public class ResourceUtil {

public static final Response OK_RESPONSE = Response.ok().build();
public static final Response OK_EMPTY_OBJECT = Response.ok(Collections.emptyMap()).build();
public static final Response OK_EMPTY_LIST = Response.ok(Collections.emptyList()).build();

public static Response ok() { return OK_RESPONSE; }
public static Response ok() { return Response.ok().build(); }

public static Response ok(Object o) { return Response.ok(o).build(); }

public static Response ok_utf8(Object o) { return Response.ok(o).header(CONTENT_ENCODING, UTF8).build(); }

public static Response ok_empty() { return OK_EMPTY_OBJECT; }
public static Response ok_empty() { return Response.ok(Collections.emptyMap()).build(); }

public static Response ok_empty_list() { return OK_EMPTY_LIST; }
public static Response ok_empty_list() { return Response.ok(Collections.emptyList()).build(); }

public static Response send(SendableResource resource) {
return send(resource.getOut(), resource.getStatus(), resource.getHeaders(), resource.getName(), resource.getContentType(), resource.getContentLength(), resource.getForceDownload());


Cargando…
Cancelar
Guardar