@Test public void evaluatesPreconditionsResponseAs_PRECONDITION_FAILED_WhenIfMatchHeaderSet() { headers.putSingle(IF_MATCH, "\"1234567\""); Response response = containerRequest.evaluatePreconditions().build(); assertEquals(PRECONDITION_FAILED, response.getStatusInfo()); }
@Override public ResponseBuilder evaluatePreconditions(EntityTag etag) { checkArgument(etag != null, "Null ETag is not supported"); ResponseBuilder responseBuilder = evaluateIfMatch(etag); if (responseBuilder == null) { responseBuilder = evaluateIfNoneMatch(etag); } return responseBuilder; }
ContainerRequest implements GenericContainerRequest { @Override public ResponseBuilder evaluatePreconditions(EntityTag etag) { checkArgument(etag != null, "Null ETag is not supported"); ResponseBuilder responseBuilder = evaluateIfMatch(etag); if (responseBuilder == null) { responseBuilder = evaluateIfNoneMatch(etag); } return responseBuilder; } }
ContainerRequest implements GenericContainerRequest { @Override public ResponseBuilder evaluatePreconditions(EntityTag etag) { checkArgument(etag != null, "Null ETag is not supported"); ResponseBuilder responseBuilder = evaluateIfMatch(etag); if (responseBuilder == null) { responseBuilder = evaluateIfNoneMatch(etag); } return responseBuilder; } ContainerRequest(String method, URI requestUri, URI baseUri, InputStream entityStream,
                            MultivaluedMap<String, String> httpHeaders, SecurityContext securityContext); }
ContainerRequest implements GenericContainerRequest { @Override public ResponseBuilder evaluatePreconditions(EntityTag etag) { checkArgument(etag != null, "Null ETag is not supported"); ResponseBuilder responseBuilder = evaluateIfMatch(etag); if (responseBuilder == null) { responseBuilder = evaluateIfNoneMatch(etag); } return responseBuilder; } ContainerRequest(String method, URI requestUri, URI baseUri, InputStream entityStream,
                            MultivaluedMap<String, String> httpHeaders, SecurityContext securityContext); @Override MediaType getAcceptableMediaType(List<MediaType> mediaTypes); @Override List<String> getCookieHeaders(); @Override InputStream getEntityStream(); @Override URI getRequestUri(); @Override URI getBaseUri(); @Override String getMethod(); @Override void setMethod(String method); @Override void setEntityStream(InputStream entityStream); @Override void setUris(URI requestUri, URI baseUri); @Override void setCookieHeaders(List<String> cookieHeaders); @Override void setRequestHeaders(MultivaluedMap<String, String> httpHeaders); @Override String getAuthenticationScheme(); @Override Principal getUserPrincipal(); @Override boolean isSecure(); @Override boolean isUserInRole(String role); @Override ResponseBuilder evaluatePreconditions(EntityTag etag); @Override ResponseBuilder evaluatePreconditions(Date lastModified); @Override ResponseBuilder evaluatePreconditions(Date lastModified, EntityTag etag); @Override ResponseBuilder evaluatePreconditions(); @Override Variant selectVariant(List<Variant> variants); @Override List<Locale> getAcceptableLanguages(); @Override List<MediaType> getAcceptableMediaTypes(); @Override List<AcceptMediaType> getAcceptMediaTypeList(); @Override Map<String, Cookie> getCookies(); @Override Date getDate(); @Override int getLength(); @Override Locale getLanguage(); @Override MediaType getMediaType(); @Override List<String> getRequestHeader(String name); @Override String getHeaderString(String name); @Override MultivaluedMap<String, String> getRequestHeaders(); @Override String toString(); }
ContainerRequest implements GenericContainerRequest { @Override public ResponseBuilder evaluatePreconditions(EntityTag etag) { checkArgument(etag != null, "Null ETag is not supported"); ResponseBuilder responseBuilder = evaluateIfMatch(etag); if (responseBuilder == null) { responseBuilder = evaluateIfNoneMatch(etag); } return responseBuilder; } ContainerRequest(String method, URI requestUri, URI baseUri, InputStream entityStream,
                            MultivaluedMap<String, String> httpHeaders, SecurityContext securityContext); @Override MediaType getAcceptableMediaType(List<MediaType> mediaTypes); @Override List<String> getCookieHeaders(); @Override InputStream getEntityStream(); @Override URI getRequestUri(); @Override URI getBaseUri(); @Override String getMethod(); @Override void setMethod(String method); @Override void setEntityStream(InputStream entityStream); @Override void setUris(URI requestUri, URI baseUri); @Override void setCookieHeaders(List<String> cookieHeaders); @Override void setRequestHeaders(MultivaluedMap<String, String> httpHeaders); @Override String getAuthenticationScheme(); @Override Principal getUserPrincipal(); @Override boolean isSecure(); @Override boolean isUserInRole(String role); @Override ResponseBuilder evaluatePreconditions(EntityTag etag); @Override ResponseBuilder evaluatePreconditions(Date lastModified); @Override ResponseBuilder evaluatePreconditions(Date lastModified, EntityTag etag); @Override ResponseBuilder evaluatePreconditions(); @Override Variant selectVariant(List<Variant> variants); @Override List<Locale> getAcceptableLanguages(); @Override List<MediaType> getAcceptableMediaTypes(); @Override List<AcceptMediaType> getAcceptMediaTypeList(); @Override Map<String, Cookie> getCookies(); @Override Date getDate(); @Override int getLength(); @Override Locale getLanguage(); @Override MediaType getMediaType(); @Override List<String> getRequestHeader(String name); @Override String getHeaderString(String name); @Override MultivaluedMap<String, String> getRequestHeaders(); @Override String toString();  }