/** * @return Whether or not to bypass caching behavior for the current request. */ public boolean getIgnoreCache() { return delegate != null && delegate.getIgnoreCache(); }
@Override public boolean getIgnoreCache() { if (ignoreCache == null) { return super.getIgnoreCache(); } return ignoreCache; }
@Override public boolean getIgnoreCache() { if (ignoreCache == null) { return super.getIgnoreCache(); } return ignoreCache; }
@Override public boolean getIgnoreCache() { return ignoreCache == null ? super.getIgnoreCache() : ignoreCache; }
@Override public boolean getIgnoreCache() { if (ignoreCache == null) { return super.getIgnoreCache(); } return ignoreCache; }
/** * @return Whether or not to bypass caching behavior for the current request. */ public boolean getIgnoreCache() { return delegate != null && delegate.getIgnoreCache(); }
/** * @return Whether or not to bypass caching behavior for the current request. */ public boolean getIgnoreCache() { return delegate != null && delegate.getIgnoreCache(); }
@Test public void testIgnoreCacheParam() { expect(request.getParameter("nocache")).andReturn(Integer.toString(Integer.MAX_VALUE)); replay(); GadgetContext context = new HttpGadgetContext(request); assertTrue(context.getIgnoreCache()); }
@Test public void testIgnoreCacheParam() { expect(request.getParameter("nocache")).andReturn(Integer.toString(Integer.MAX_VALUE)); replay(); GadgetContext context = new HttpGadgetContext(request); assertTrue(context.getIgnoreCache()); }
public void addSubstitutions(Substitutions substituter, GadgetContext context, GadgetSpec spec) throws GadgetException { MessageBundle bundle = messageBundleFactory.getBundle(spec, context.getLocale(), context.getIgnoreCache(), context.getContainer()); substituter.addSubstitutions(Substitutions.Type.MESSAGE, bundle.getMessages()); } }
public void addSubstitutions(Substitutions substituter, GadgetContext context, GadgetSpec spec) throws GadgetException { MessageBundle bundle = messageBundleFactory.getBundle(spec, context.getLocale(), context.getIgnoreCache(), context.getContainer()); substituter.addSubstitutions(Substitutions.Type.MESSAGE, bundle.getMessages()); } }
@Test public void testIgnoreCacheParam() { expect(request.getParameter("nocache")).andReturn(Integer.toString(Integer.MAX_VALUE)); replay(); GadgetContext context = new HttpGadgetContext(request); assertTrue(context.getIgnoreCache()); }
public void addSubstitutions(Substitutions substituter, GadgetContext context, GadgetSpec spec) throws GadgetException { MessageBundle bundle = messageBundleFactory.getBundle(spec, context.getLocale(), context.getIgnoreCache(), context.getContainer()); String dir = bundle.getLanguageDirection(); boolean rtl = RTL.equals(dir); substituter.addSubstitution(Substitutions.Type.BIDI, START_EDGE, rtl ? RIGHT : LEFT); substituter.addSubstitution(Substitutions.Type.BIDI, END_EDGE, rtl ? LEFT : RIGHT); substituter.addSubstitution(Substitutions.Type.BIDI, DIR, rtl ? RTL : LTR); substituter.addSubstitution(Substitutions.Type.BIDI, REVERSE_DIR, rtl ? LTR : RTL); } }
private Gadget mockGadget(boolean nocache, boolean debug, boolean isContainer) { GadgetContext context = createMock(GadgetContext.class); expect(context.getContainer()).andReturn(CONTAINER).anyTimes(); expect(context.getIgnoreCache()).andReturn(nocache).anyTimes(); expect(context.getDebug()).andReturn(debug).anyTimes(); expect(context.getUrl()).andReturn(GADGET_URI).anyTimes(); expect(context.getRenderingContext()).andReturn( isContainer ? RenderingContext.CONTAINER : RenderingContext.GADGET).anyTimes(); replay(context); return new Gadget().setContext(context); }
public void addSubstitutions(Substitutions substituter, GadgetContext context, GadgetSpec spec) throws GadgetException { MessageBundle bundle = messageBundleFactory.getBundle(spec, context.getLocale(), context.getIgnoreCache(), context.getContainer(), context.getView()); substituter.addSubstitutions(Substitutions.Type.MESSAGE, bundle.getMessages()); } }
public void addSubstitutions(Substitutions substituter, GadgetContext context, GadgetSpec spec) throws GadgetException { MessageBundle bundle = messageBundleFactory.getBundle(spec, context.getLocale(), context.getIgnoreCache(), context.getContainer(), context.getView()); String dir = bundle.getLanguageDirection(); boolean rtl = RTL.equals(dir); substituter.addSubstitution(Substitutions.Type.BIDI, START_EDGE, rtl ? RIGHT : LEFT); substituter.addSubstitution(Substitutions.Type.BIDI, END_EDGE, rtl ? LEFT : RIGHT); substituter.addSubstitution(Substitutions.Type.BIDI, DIR, rtl ? RTL : LTR); substituter.addSubstitution(Substitutions.Type.BIDI, REVERSE_DIR, rtl ? LTR : RTL); } }
protected ProxyUriBase(Gadget gadget) { this(null, // Meaningless in "context" mode. translateStatusRefresh invalid here. getIntegerValue(gadget.getContext().getParameter(Param.REFRESH.getKey())), gadget.getContext().getDebug(), gadget.getContext().getIgnoreCache(), gadget.getContext().getContainer(), gadget.getSpec().getUrl().toString()); }
public static HttpRequest newHttpRequest(GadgetContext context, RequestAuthenticationInfo authenticationInfo) throws GadgetException { return new HttpRequest(authenticationInfo.getHref()) .setSecurityToken(context.getToken()) .setOAuthArguments(new OAuthArguments(authenticationInfo)) .setAuthType(authenticationInfo.getAuthType()) .setContainer(context.getContainer()) .setGadget(context.getUrl()) .setIgnoreCache(context.getIgnoreCache()); }
public static HttpRequest newHttpRequest(GadgetContext context, RequestAuthenticationInfo authenticationInfo) throws GadgetException { return new HttpRequest(authenticationInfo.getHref()) .setSecurityToken(context.getToken()) .setOAuthArguments(new OAuthArguments(authenticationInfo)) .setOAuth2Arguments(new OAuth2Arguments(authenticationInfo)) .setAuthType(authenticationInfo.getAuthType()) .setContainer(context.getContainer()) .setGadget(context.getUrl()) .setIgnoreCache(context.getIgnoreCache()); }
protected ProxyUriBase(Gadget gadget) { this(null, // Meaningless in "context" mode. translateStatusRefresh invalid here. getIntegerValue(gadget.getContext().getParameter(Param.REFRESH.getKey())), gadget.getContext().getDebug(), gadget.getContext().getIgnoreCache(), gadget.getContext().getContainer(), setAuthorityAsGadgetParam ? gadget.getSpec().getUrl().getAuthority() : gadget.getSpec().getUrl().toString()); }