Package com.volantis.mcs.context

Examples of com.volantis.mcs.context.ResponseCachingDirectives.disable()


        final ResponseCachingDirectives cachingDirectives =
            envContext.getCachingDirectives();
        cachingDirectives.enable();
        cachingDirectives.setMaxAge(Period.inSeconds(50),
            ResponseCachingDirectives.PRIORITY_NORMAL);
        cachingDirectives.disable();

        envContext.applyCachingDirectives();
        assertEquals("no-cache", response.getHeader("Pragma"));
        assertEquals("no-cache", response.getHeader("Cache-Control"));
        final Calendar calendar =
View Full Code Here


            configureServiceDefintion(marinerRequestContext,
                                      environmentContext);
            final ResponseCachingDirectives cachingDirectives =
                environmentContext.getCachingDirectives();
            if (cachingDirectives != null && disableResponseCaching) {
                cachingDirectives.disable();
            }
            processXDIME(marinerRequestContext, xdimeContent, characterSet);
        } catch (MarinerContextException e) {
            logger.error("mariner-context-exception", e);
            throw new ServletException(
View Full Code Here

                        context.getDeviceLayoutContext().getMarinerPageContext();
                    final ResponseCachingDirectives cachingDirectives =
                        pageContext.getEnvironmentContext().getCachingDirectives();
                    // caching is not supported for fragmented pages
                    if (cachingDirectives != null) {
                        cachingDirectives.disable();
                    }

                    Fragment fragment = (Fragment)instance.getFormat();
                    Format child = fragment.getChildAt(0);
View Full Code Here

            ContextInternals.getEnvironmentContext(
                context.getInitialRequestContext());
        final ResponseCachingDirectives cachingDirectives =
            environmentContext.getCachingDirectives();
        if (cachingDirectives != null) {
            cachingDirectives.disable();
        }
    }
}
View Full Code Here

                    context.getDeviceLayoutContext().getMarinerPageContext();
                final ResponseCachingDirectives cachingDirectives =
                    pageContext.getEnvironmentContext().getCachingDirectives();
                // caching is not supported for fragmented forms
                if (cachingDirectives != null) {
                    cachingDirectives.disable();
                }

                FormFragment fragment = (FormFragment)instance.getFormat();
                Format child = fragment.getChildAt(0);
View Full Code Here

        final ResponseCachingDirectives cachingDirectives =
            environmentContext.getCachingDirectives();
        if (cachingDirectives != null) {
            // disable caching if dissection is used
            if (isDissectionNeeded()) {
                cachingDirectives.disable();
            }
            if (cachingDirectives.isEnabled() &&
                    !ResponseCachingDirectives.PRIORITY_NORMAL.isLower(
                        cachingDirectives.getExpiresPriority())) {
                final XMLPipelineContext pipelineContext =
View Full Code Here

                    if (dependency.getCacheability() == Cacheability.CACHEABLE) {
                        cachingDirectives.setMaxAge(dependency.getTimeToLive(),
                            ResponseCachingDirectives.PRIORITY_NORMAL);
                        cachingDirectives.enable();
                    } else {
                        cachingDirectives.disable();
                    }
                }
            }
        }
        environmentContext.applyCachingDirectives();
View Full Code Here

                = ContextInternals.getMarinerPageContext(context);

        final ResponseCachingDirectives cachingDirectives =
                pageContext.getEnvironmentContext().getCachingDirectives();
        if (cachingDirectives != null) {
            cachingDirectives.disable();
        }

        XFFormAttributes attributes = (XFFormAttributes) papiAttributes;

        // Try and find the form with the specified name, if it could not be
View Full Code Here

    private void applyNoCache(MarinerRequestContext context) {
        final ResponseCachingDirectives cachingDirectives =
                getCachingDirectives(context);

        if (cachingDirectives != null) {
            cachingDirectives.disable();
        }
    }

    /**
     * Enables caching for this response, allowing output headers to be set for cache-control.
View Full Code Here

            ContextInternals.getEnvironmentContext(
                context.getInitialRequestContext());
        final ResponseCachingDirectives cachingDirectives =
            environmentContext.getCachingDirectives();
        if (cachingDirectives != null) {
            cachingDirectives.disable();
        }
    }

    /**
     * Initialize a new instance using the given parameters.
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.