Package com.volantis.mcs.context

Examples of com.volantis.mcs.context.MarinerPageContext


            throws PAPIException {
        if (parent != null) {
            parent.setPolicySource(policySource);
            // only pop ourselves of the stack if there was a parent.  if there
            // wasn't we would not have pushed ourselves onto the stack.
            MarinerPageContext pageContext =
                    ContextInternals.getMarinerPageContext(context);
            pageContext.popMCSIElement();
        }

        return CONTINUE_PROCESSING;
    }
View Full Code Here


    // Javadoc inherited from MCSIElement interface
    public int elementStart(MarinerRequestContext context,
                            PAPIAttributes mcsiAttributes)
            throws PAPIException {
        // Push this element onto the MCSI stack.
        MarinerPageContext pageContext =
                ContextInternals.getMarinerPageContext(context);
        pageContext.pushMCSIElement(this);
       
        return PROCESS_ELEMENT_BODY;
    }
View Full Code Here

    // Javadoc inherited from MCSIElement interface
    public int elementEnd(MarinerRequestContext context,
                          PAPIAttributes mcsiAttributes)
            throws PAPIException {
        MarinerPageContext pageContext =
                ContextInternals.getMarinerPageContext(context);
       
        // pop this element off the MCSI stack.
        pageContext.popMCSIElement();
       
        return CONTINUE_PROCESSING;
    }
View Full Code Here

    /**
     * Tests if writing out a pre element keeps white-spaces.
     */
    public void testPre() throws Exception {
        final DOMOutputBuffer rootBuffer = new TestDOMOutputBuffer();
        final MarinerPageContext context = protocol.getMarinerPageContext();
        context.pushOutputBuffer(rootBuffer);
        final PreAttributes attributes = new PreAttributes();
        attributes.setStyles(StylesBuilder.getInitialValueStyles());
        final EmphasisAttributes emphasisAttrs = new EmphasisAttributes();

        protocol.writeOpenPre(attributes);
        final DOMOutputBuffer buffer =
            (DOMOutputBuffer) context.getCurrentOutputBuffer();
        assertNotEquals(rootBuffer, buffer);

        buffer.writeText("     before     ");
        protocol.writeOpenEmphasis(emphasisAttrs);
        context.getCurrentOutputBuffer().writeText("     child     text     ");
        protocol.writeCloseEmphasis(emphasisAttrs);
        buffer.writeText("     after     ");
        protocol.writeClosePre(attributes);

        // check the result
View Full Code Here

                    MarlinSAXHelper.getXMLReader(servletRequestContext);

        storeVisitedIdsInPipelineContext(servletRequestContext);

        // enable dependency tracking
        final MarinerPageContext pageContext =
            ContextInternals.getMarinerPageContext(servletRequestContext);
        final XMLPipelineContext pipelineContext =
            pageContext.getEnvironmentContext().getPipelineContext();
        pipelineContext.getDependencyContext().pushDependencyTracker(
            Tracking.ENABLED);

        // connect the given content handler to the parser
        xmlReader.setContentHandler(contentHandler);
View Full Code Here

     * @param context used to get the pipeline initialiseation.
     * @return the pipeline factory, not expected to be null.
     */
    private XMLPipelineFactory getPipelineFactory(
        MarinerRequestContext context) {
        MarinerPageContext marinerPageContext =
            ContextInternals.getMarinerPageContext(context);

        // initialize the pipelineInitialization so that we can
        // create a pipeline.
        PipelineInitialization pipelineInitialization =
            marinerPageContext.getVolantisBean().getPipelineInitialization();

        // get hold of the pipeline factory
        return pipelineInitialization.getPipelineFactory();
    }
View Full Code Here

                throw new ServletException("Unable to create new " +
                                           "MarinerServletRequestContext");
            }
        }

        MarinerPageContext pageContext =
                ContextInternals.getMarinerPageContext(requestContext);

        // Get the name of the form from the vform parameter
        String formSpecifier = (String) request.getParameter("vform");

        if (formSpecifier == null) {
            logger.error("form-name-missing");
            requestContext.release();
            throw new ServletException("No vform parameter passed.");
        }

        // Determine which URL to go to from which submission
        // button was pressed to get here
        String targetURL = null;

        SessionFormData formData = pageContext.getFormDataManager().
                getSessionFormData(formSpecifier);

        if (request.getParameter(URLConstants.NEXT_FORM_FRAGMENT) != null) {
            targetURL = formData.getFieldValue(URLConstants.NEXT_FORM_FRAGMENT);
        } else if (request.getParameter(URLConstants.PREV_FORM_FRAGMENT) !=
View Full Code Here

     * @throws Exception
     */
    public void testIsToBeAddedNoCache() throws Exception {
        final MultipartPackageHandler handler =
            new MultipartPackageHandler();
        MarinerPageContext pageContext = createContexts(handler);

        // No caching
        // @todo use a constant from DevicePolicyConstants
        ((TestMarinerPageContext)pageContext).
            setDevicePolicyValue("protocol.mime.urls.to.cache",
View Full Code Here

    }

    public void testIsToBeAdded() throws Exception {
        final MultipartPackageHandler handler =
            new MultipartPackageHandler();
        MarinerPageContext pageContext = createContexts(handler);

        // Make sure caching will be enabled
        ((TestMarinerPageContext)pageContext).setDevicePolicyValue(
            "protocol.mime.urls.to.cache",
            "3");
View Full Code Here

    // work needs checking in.  I will change this testcase to not run and raise
    // a seperate VBM to fix this testcase.  VBM: 2003051304
    public void noTestCreatePackage() throws Exception {
        final MultipartPackageHandler handler =
            new MultipartPackageHandler();
        MarinerPageContext pageContext = createContexts(handler);
        MarinerRequestContext requestContext =
            pageContext.getRequestContext();
        TestEnvironmentContext envContext =
            (TestEnvironmentContext)pageContext.getEnvironmentContext();

        // This asset exists
        final DeviceImageAsset imageAsset =
            new DeviceImageAsset(
                "jug", 15, 15, 1,
View Full Code Here

TOP

Related Classes of com.volantis.mcs.context.MarinerPageContext

Copyright © 2018 www.massapicom. 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.