Examples of PageGenerationCache


Examples of com.volantis.mcs.runtime.PageGenerationCache

        String formSpecifier = formDataManager.getFormSpecifier(fd);

        context.setPolicyReferenceResolver(referenceResolverMock);

        context.pushDeviceLayoutContext(new DeviceLayoutContext());
        PageGenerationCache pageGenerationCache = new PageGenerationCache();
        pageGenerationCache.createFormFragmentationStates(form.getName());
        context.setPageGenerationCache(pageGenerationCache);
        protocol.setMarinerPageContext(context);
        if(protocol.getPageHead()==null) {
            protocol.initialisePageHead();
        }
View Full Code Here

Examples of com.volantis.mcs.runtime.PageGenerationCache

        // Register a dummy EnvironmentContext against the request context
        ContextInternals.setEnvironmentContext(requestContext,
                                               new TestEnvironmentContext());
        VolantisProtocol protocol = new VolantisProtocolStub();       
        pageContext.setProtocol(protocol);
        pageContext.setPageGenerationCache(new PageGenerationCache());
        pageContext.setRequestURL(
                new MarinerURL("http://server:8080/volantis/test.xdime"));
        ContextInternals.setMarinerPageContext(requestContext, pageContext);
        protocol.setMarinerPageContext(pageContext);
View Full Code Here

Examples of com.volantis.mcs.runtime.PageGenerationCache

         * Override superclass method (non-Javadoc)
         * @see com.volantis.mcs.context.MarinerPageContext#getPageGenerationCache()
         */
        public PageGenerationCache getPageGenerationCache() {
            if (pageGenerationCache == null) {
                pageGenerationCache = new PageGenerationCache();
            }
            return pageGenerationCache;
        }
View Full Code Here

Examples of com.volantis.mcs.runtime.PageGenerationCache

                new TestProtocolRegistry.TestDOMProtocolFactory(), null);
        final TestMarinerPageContext pageContext = new TestMarinerPageContext();

        pageContext.pushRequestContext(requestContext);
        pageContext.setProtocol(protocol);
        pageContext.setPageGenerationCache(new PageGenerationCache());
        pageContext.setRequestURL(
                new MarinerURL("http://server:8080/volantis/test.xdime"));

        final PolicyReferenceResolverMock referenceResolverMock =
                new PolicyReferenceResolverMock("referenceResolverMock",
View Full Code Here

Examples of com.volantis.mcs.runtime.PageGenerationCache

                };
            }

        });
        // Fragmentation stores it's state in the page generation cache.
        pageContext.setPageGenerationCache(new PageGenerationCache());

        FragmentLinkWriter writer = new DefaultFragmentLinkWriter(pageContext);
        Fragment source = new Fragment(canvasLayout);
        Fragment destination = new Fragment(canvasLayout);
View Full Code Here

Examples of com.volantis.mcs.runtime.PageGenerationCache

                    }
                };
            }
        });
        // Fragmentation stores it's state in the page generation cache.
        pageContext.setPageGenerationCache(new PageGenerationCache());

        FragmentLinkWriter writer = new DefaultFragmentLinkWriter(pageContext);
        Fragment source = new Fragment(canvasLayout);
        Fragment destination = new Fragment(canvasLayout);
View Full Code Here

Examples of com.volantis.mcs.runtime.PageGenerationCache

        if (logger.isDebugEnabled()) {
            logger.debug("Change to be applied is " + change);
        }

        PageGenerationCache pgCache = context.getPageGenerationCache();

        int changeIndex = pgCache.getFormFragmentationStateChangeIndex(
                formName, change);

        String requestValue = PageGenerationCache.
                makeFragmentChangeSpecifier(currentKey, changeIndex);
View Full Code Here

Examples of com.volantis.mcs.runtime.PageGenerationCache

                logger.debug("Generating link to enclosed fragment");
            }
        }

        String requestValue;
        PageGenerationCache pageGenerationCache
                = pageContext.getPageGenerationCache();

        RuntimeDeviceLayout deviceLayout =
                pageContext.getDeviceLayout();
        String defaultFragmentName = deviceLayout.getDefaultFragmentName();
        boolean isDefault = true;
        if (defaultFragmentName == null
                || !fragmentName.equals(defaultFragmentName)) {
            isDefault = false;
        }

        // If we are generating a link to the enclosing fragment and this is
        // the top inclusion then we do not need to add a vfrag value to the
        // URL.
        if (toEnclosing && inclusionPath == null && isDefault) {
            if (logger.isDebugEnabled()) {
                logger.debug("Returning to default top level fragment");
            }
            requestValue = null;
        } else {

            // The change to apply to the fragmentation state.
            FragmentationState.Change change;

            // If the enclosing fragment is the default fragment for the layout
            // then discard the information about it, this reduces the number
            // of possible fragmentation states for a particular layout which
            // reduces the memory usage.

            change = new FragmentationState.FragmentChange(inclusionPath,
                                                           fragmentName,
                                                           toEnclosing,
                                                           isDefault);

            if (logger.isDebugEnabled()) {
                logger.debug("Change to be applied is " + change);
            }

            int changeIndex = pageGenerationCache.
                    getFragmentationStateChangeIndex(change);

            requestValue = PageGenerationCache.
                    makeFragmentChangeSpecifier(currentKey, changeIndex);
        }
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.