Package org.jboss.resteasy.spi

Examples of org.jboss.resteasy.spi.NoLogWebApplicationException


         // check to see if ETags are the same.  If they are, we don't need to send a response back.
         Response.ResponseBuilder validatedResponse = validation.evaluatePreconditions(new EntityTag(etag));
         if (validatedResponse != null)
         {
            throw new NoLogWebApplicationException(validatedResponse.status(Response.Status.NOT_MODIFIED).cacheControl(cc).header(HttpHeaders.ETAG, etag).build());
         }

         old.write(entity);
      }
      finally
View Full Code Here


      }

      public String error()
      {
         Response r = Response.status(404).type("text/plain").entity("there was an error").build();
         throw new NoLogWebApplicationException(r);
      }
View Full Code Here

      @Override
      public void update(String id, String obj)
      {
         Response r = Response.status(404).type("text/plain").entity("there was an error").build();
         throw new NoLogWebApplicationException(r);
      }
View Full Code Here

      }

      public String error()
      {
         Response r = Response.status(404).type("text/plain").entity("there was an error").build();
         throw new NoLogWebApplicationException(r);
      }
View Full Code Here

public class NoLogWebApplicationExceptionMapperTest extends
    TestExceptionMapperBase {

    @Test
    public void handleNoLogWebAppExc() {
        NoLogWebApplicationException isee = new NoLogWebApplicationException(400);
        NoLogWebApplicationExceptionMapper iseem =
            injector.getInstance(NoLogWebApplicationExceptionMapper.class);
        Response r = iseem.toResponse(isee);
        assertEquals(400, r.getStatus());
        verifyMessage(r, rtmsg(null));
View Full Code Here

    protected void handlePreflightRequest() {
        if (request.getHttpMethod().equalsIgnoreCase("OPTIONS")) {
            logger.debug("Cors admin pre-flight");
            Response response = Cors.add(request, Response.ok()).preflight().allowedMethods("GET", "PUT", "POST", "DELETE").auth().build();
            throw new NoLogWebApplicationException(response);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.spi.NoLogWebApplicationException

Copyright © 2018 www.massapicom. 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.