cacheControl.setNoStore(true); } else if ("no-transform".equals(directiveName)) { cacheControl.setNoTransform(true); } else if ("must-revalidate".equals(directiveName)) { cacheControl.setMustRevalidate(true);
cacheControl.setNoStore(true); } else if ("no-transform".equals(directiveName)) { cacheControl.setNoTransform(true); } else if ("must-revalidate".equals(directiveName)) { cacheControl.setMustRevalidate(true);
cacheControl.setNoTransform(true); cacheControl.setPrivate(true); builder.cacheControl(cacheControl);
cacheControl.setNoTransform(true); cacheControl.setPrivate(true); builder.cacheControl(cacheControl);
@Override public CacheControl fromString(String header) { throwIllegalArgumentExceptionIfNull(header, LocalizationMessages.CACHE_CONTROL_IS_NULL()); try { HttpHeaderReader reader = HttpHeaderReader.newInstance(header); CacheControl cacheControl = new CacheControl(); cacheControl.setNoTransform(false); // defaults to true while (reader.hasNext()) { readDirective(cacheControl, reader); if (reader.hasNextSeparator(',', true)) { reader.nextSeparator(','); } } return cacheControl; } catch (ParseException pe) { throw new IllegalArgumentException( "Error parsing cache control '" + header + "'", pe); } }
@Override public CacheControl fromString(String header) { throwIllegalArgumentExceptionIfNull(header, LocalizationMessages.CACHE_CONTROL_IS_NULL()); try { HttpHeaderReader reader = HttpHeaderReader.newInstance(header); CacheControl cacheControl = new CacheControl(); cacheControl.setNoTransform(false); // defaults to true while (reader.hasNext()) { readDirective(cacheControl, reader); if (reader.hasNextSeparator(',', true)) { reader.nextSeparator(','); } } return cacheControl; } catch (ParseException pe) { throw new IllegalArgumentException( "Error parsing cache control '" + header + "'", pe); } }
CacheControlledResponseFilter(CacheControl control) { final javax.ws.rs.core.CacheControl cacheControl = new javax.ws.rs.core.CacheControl(); cacheControl.setPrivate(control.isPrivate()); cacheControl.setNoCache(control.noCache()); cacheControl.setNoStore(control.noStore()); cacheControl.setNoTransform(control.noTransform()); cacheControl.setMustRevalidate(control.mustRevalidate()); cacheControl.setProxyRevalidate(control.proxyRevalidate()); cacheControl.setMaxAge((int) control.maxAgeUnit().toSeconds(control.maxAge())); cacheControl.setSMaxAge((int) control.sharedMaxAgeUnit() .toSeconds(control.sharedMaxAge())); if (control.immutable()) { cacheControl.setMaxAge(ONE_YEAR_IN_SECONDS); } cacheResponseHeader = cacheControl.toString(); }
protected CacheControl initCacheControl(NoCache value) { CacheControl cacheControl = new CacheControl(); cacheControl.setNoCache(true); cacheControl.setNoTransform(false); for (String field : value.fields()) cacheControl.getNoCacheFields().add(field); return cacheControl; } }
cc.setNoTransform(true); cc.setMustRevalidate(false); cc.setNoCache(false);
protected CacheControl initCacheControl(Cache methodCached) { CacheControl cacheControl = new CacheControl(); if (methodCached.isPrivate()) { cacheControl.setPrivate(true); } if (methodCached.maxAge() > -1) { cacheControl.setMaxAge(methodCached.maxAge()); } if (methodCached.sMaxAge() > -1) { cacheControl.setSMaxAge(methodCached.sMaxAge()); } cacheControl.setMustRevalidate((methodCached.mustRevalidate())); cacheControl.setNoStore((methodCached.noStore())); cacheControl.setNoTransform((methodCached.noTransform())); cacheControl.setProxyRevalidate(methodCached.proxyRevalidate()); cacheControl.setNoCache(methodCached.noCache()); return cacheControl; }
public static CacheControl cacheControl(boolean p_noStore, boolean p_noTransform) { final CacheControl cacheControl = new CacheControl(); cacheControl.setNoStore(p_noStore); cacheControl.setNoTransform(p_noTransform); return cacheControl; }
private static Response response(String response, String type, Date lastModified) { byte[] responseBytes = response.getBytes(StandardCharsets.UTF_8); String mimeType = type + "; charset=UTF-8"; CacheControl cacheControl = new CacheControl(); cacheControl.setNoTransform(false); cacheControl.setMaxAge(0); return Response.ok(responseBytes, mimeType).lastModified(lastModified) .header("Content-Length", responseBytes.length) .cacheControl(cacheControl).build(); }
private Response response(ResponseBuilder builder, OAuth2AuditLog oAuth2AuditLog) { CacheControl cacheControl = new CacheControl(); cacheControl.setNoTransform(false); cacheControl.setNoStore(true); builder.cacheControl(cacheControl); builder.header("Pragma", "no-cache"); applicationAuditLogger.sendMessage(oAuth2AuditLog); return builder.build(); }
private Response response(Response.ResponseBuilder builder, OAuth2AuditLog oAuth2AuditLog) { CacheControl cacheControl = new CacheControl(); cacheControl.setNoTransform(false); cacheControl.setNoStore(true); builder.cacheControl(cacheControl); builder.header("Pragma", "no-cache"); applicationAuditLogger.sendMessage(oAuth2AuditLog); return builder.build(); } }
protected CacheControl initCacheControl(NoCache value) { CacheControl cacheControl = new CacheControl(); cacheControl.setNoCache(true); cacheControl.setNoTransform(false); for (String field : value.fields()) cacheControl.getNoCacheFields().add(field); return cacheControl; } }
protected CacheControl initCacheControl(NoCache value) { CacheControl cacheControl = new CacheControl(); cacheControl.setNoCache(true); cacheControl.setNoTransform(false); for (String field : value.fields()) cacheControl.getNoCacheFields().add(field); return cacheControl; } }
public CacheControl fromString(String header) { if (header == null) throw new IllegalArgumentException("Cache control is null"); try { HttpHeaderReader reader = HttpHeaderReader.newInstance(header); CacheControl cacheControl = new CacheControl(); cacheControl.setNoTransform(false); // defaults to true while (reader.hasNext()) { readDirective(cacheControl, reader); if (reader.hasNextSeparator(',', true)) reader.nextSeparator(','); } return cacheControl; } catch (ParseException pe) { throw new IllegalArgumentException( "Error parsing cache control '" + header + "'", pe); } }
@Override public CacheControl fromString(String header) { throwIllegalArgumentExceptionIfNull(header, LocalizationMessages.CACHE_CONTROL_IS_NULL()); try { HttpHeaderReader reader = HttpHeaderReader.newInstance(header); CacheControl cacheControl = new CacheControl(); cacheControl.setNoTransform(false); // defaults to true while (reader.hasNext()) { readDirective(cacheControl, reader); if (reader.hasNextSeparator(',', true)) { reader.nextSeparator(','); } } return cacheControl; } catch (ParseException pe) { throw new IllegalArgumentException( "Error parsing cache control '" + header + "'", pe); } }
@Override public CacheControl fromString(String header) { throwIllegalArgumentExceptionIfNull(header, LocalizationMessages.CACHE_CONTROL_IS_NULL()); try { HttpHeaderReader reader = HttpHeaderReader.newInstance(header); CacheControl cacheControl = new CacheControl(); cacheControl.setNoTransform(false); // defaults to true while (reader.hasNext()) { readDirective(cacheControl, reader); if (reader.hasNextSeparator(',', true)) { reader.nextSeparator(','); } } return cacheControl; } catch (ParseException pe) { throw new IllegalArgumentException( "Error parsing cache control '" + header + "'", pe); } }
CacheControlledResponseFilter(CacheControl control) { final javax.ws.rs.core.CacheControl cacheControl = new javax.ws.rs.core.CacheControl(); cacheControl.setPrivate(control.isPrivate()); cacheControl.setNoCache(control.noCache()); cacheControl.setNoStore(control.noStore()); cacheControl.setNoTransform(control.noTransform()); cacheControl.setMustRevalidate(control.mustRevalidate()); cacheControl.setProxyRevalidate(control.proxyRevalidate()); cacheControl.setMaxAge((int) control.maxAgeUnit().toSeconds(control.maxAge())); cacheControl.setSMaxAge((int) control.sharedMaxAgeUnit() .toSeconds(control.sharedMaxAge())); if (control.immutable()) { cacheControl.setMaxAge(ONE_YEAR_IN_SECONDS); } cacheResponseHeader = cacheControl.toString(); }