Package com.dotcms.repackage.javax.ws.rs.core.Response

Examples of com.dotcms.repackage.javax.ws.rs.core.Response.ResponseBuilder.cacheControl()


    CacheControl cc = new CacheControl();
    cc.setNoCache(true);
    User user = auth.getUser();
    String username = (user != null) ? user.getFullName() : " unknown ";
    ResponseBuilder builder = Response.ok("{\"result\":\"" + username + " PUT!\"}", "application/json");
    return builder.cacheControl(cc).build();
  }

  @POST
  public Response doPost(@Context HttpServletRequest request, @PathParam("params") String params) throws URISyntaxException {
    InitDataObject auth = init(null, true, request, false);
View Full Code Here


    User user = auth.getUser();
    String username = (user != null) ? user.getFullName() : " unknown ";
    CacheControl cc = new CacheControl();
    cc.setNoCache(true);
    ResponseBuilder builder = Response.ok("{\"result\":\"" + username + " POST!\"}", "application/json");
    return builder.cacheControl(cc).build();
  }

  /**
   * This is an authenticated rest service.
   *
 
View Full Code Here

    User user = auth.getUser();
    String username = (user != null) ? user.getFullName() : " unknown ";
    CacheControl cc = new CacheControl();
    cc.setNoCache(true);
    ResponseBuilder builder = Response.ok("{\"result\":\"/test/" + username + " GET!\"}", "application/json");
    return builder.cacheControl(cc).build();

  }

  @GET
  public Response loadRoot(@Context HttpServletRequest request, @PathParam("params") String params) throws DotStateException,
View Full Code Here

    User user = auth.getUser();
    String username = (user != null) ? user.getFullName() : " unknown ";
    CacheControl cc = new CacheControl();
    cc.setNoCache(true);
    ResponseBuilder builder = Response.ok("{\"result\":\"" + username + " GET!\"}", "application/json");
    return builder.cacheControl(cc).build();

  }

}
View Full Code Here

                CacheControl cc = new CacheControl();
                cc.setNoCache(true);

                ResponseBuilder builder = Response
                                .ok("{\"test\":\"test\"}", "application/json");
                return builder.cacheControl(cc).build();

        }


View Full Code Here

    ResponseBuilder builder = Response.ok(getJspResponse(request, portlet.getPortletId(), jspName), "text/html");
    CacheControl cc = new CacheControl();
    cc.setNoCache(true);

    return builder.cacheControl(cc).build();

  }

  private class ResponseWrapper extends HttpServletResponseWrapper {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.