Package com.volantis.mcs.runtime.configuration

Examples of com.volantis.mcs.runtime.configuration.ProtocolsConfiguration


        // Add in a default protocols configuration so that post field
        // elements do not fail.

        Volantis bean = getVolantis();
        ProtocolsConfiguration config = bean.getProtocolsConfiguration();
        config.setWmlPreferredOutputFormat("wmlc");
        pageContext.setVolantis(bean);


        // set a page head attribute to prevent multiple fixtures failing when
        // these tests are run with the WapTV5_WMLVersion1_3 protocol subclass.
View Full Code Here


        privateSetUp();

        TestMarinerPageContext mpc = new TestMarinerPageContext();
        mpc.pushRequestContext( new TestMarinerRequestContext());

        ProtocolsConfiguration config = new ProtocolsConfiguration();
        config.setWmlPreferredOutputFormat("wmlc");
        Volantis bean = new Volantis();
        bean.setProtocolsConfiguration(config);
        mpc.setVolantis(bean);

        /**
 
View Full Code Here

        testable.setCurrentBuffer(null, buffer);

        // Add in a protocols configuration so that action input fields do
        // not have exceptions for dollar encoding.
        Volantis v = getVolantis();
        ProtocolsConfiguration pc = v.getProtocolsConfiguration();
        pc.setWmlPreferredOutputFormat("wml");
        pageContext.setVolantis(v);
    }
View Full Code Here

                super.setUp(config);
            }
        });
        mgr.useAppWith(new AppExecutor() {
            public void execute(AppContext context) {
                ProtocolsConfiguration pc =
                    volantis.getProtocolsConfiguration();
                assertNotNull("Protocols configuration should exist", pc );
                assertEquals( "Preferred output should be WMLC",
                    WMLOutputPreference.WMLC, pc.getPreferredOutputFormat());
            }
        });
    }   
View Full Code Here

                config.wmlPreferredOutputFormat = "wml";
            }
        });
        mgr.useAppWith(new AppExecutor() {
            public void execute(AppContext context) {
                ProtocolsConfiguration pc =
                    volantis.getProtocolsConfiguration();
                assertNotNull("Protocols configuration should exist", pc );
                assertEquals( "Preferred output should be WML",
                    WMLOutputPreference.WML, pc.getPreferredOutputFormat());
            }
        });
    }
View Full Code Here

        TestXmlConfigurationBuilder configBuilder =
                new TestXmlConfigurationBuilder(doc);
        MarinerConfiguration config = configBuilder.buildConfiguration();
        assertNotNull(config);
       
        ProtocolsConfiguration conf = config.getProtocols();
        if (value != null) {
            assertNotNull("ProtocolsConfiguration", conf);
            assertEquals(value.output, conf.getPreferredOutputFormat());
        } else {
            assertNull("ProtocolsConfiguration", conf);
        }
    }
View Full Code Here

        InternalDevice device = InternalDeviceTestHelper.createTestDevice();
        pageContext.setDevice(device);

        pageContext.setProtocol(protocol);
        // Set the protocols configuration
        ProtocolsConfiguration config = new ProtocolsConfiguration();
        config.setWmlPreferredOutputFormat("wml");
        volantis.setProtocolsConfiguration(config);


        MarinerRequestContext requestContext =
                ProtocolTestAbstract.initialiseMarinerRequestContext(
View Full Code Here

     *
     * @return An instance of Volantis
     */
    protected Volantis getVolantis() {
        Volantis volantis = new Volantis();
        ProtocolsConfiguration config = new ProtocolsConfiguration();
        config.setWmlPreferredOutputFormat("wmlc");
        volantis.setProtocolsConfiguration(config);

        try {
            PrivateAccessor.setField(volantis, "pageURLRewriter",
                new RuntimePageURLRewriter(null, null));
View Full Code Here

     * todo XDIME-CP
     */
    public void notestSupportsNestedTables() throws Exception {
        privateSetUp();

        ProtocolsConfiguration config = new ProtocolsConfiguration();
        config.setWmlPreferredOutputFormat("wmlc");
        Volantis bean = new Volantis();
        bean.setProtocolsConfiguration(config);
        pageContext.setVolantis(bean);

        DefaultDevice device = new DefaultDevice("TestDevice", null, null);
View Full Code Here

        // Create references to all the simple sub-objects
        AgentConfiguration agent = mariner.getAgent();
        AppServerConfiguration appServer = mariner.getAppServer();
        DebugConfiguration debug = mariner.getDebug();
        ProtocolsConfiguration protocols = mariner.getProtocols();

        // Build the map of element attribute values just the same as the
        // previous XMLHandler based Config did for backwards compatibility.
        AttributeMap attrs;
        if (mariner != null) {

            attrs = makeAttrs(Volantis.CONFIG_PAGEMESSAGES_ELEMENT);
            attrs.put("heading", mariner.getPageMessageHeading());

            attrs = makeAttrs(Volantis.CONFIG_SCRIPTS_ELEMENT);
            attrs.put("base", mariner.getScriptsBase());

            attrs = makeAttrs(Volantis.CONFIG_MODESETS_ELEMENT);
            attrs.put("base", mariner.getModeSetsBase());

            attrs = makeAttrs(Volantis.CONFIG_CHARTIMAGES_ELEMENT);
            attrs.put("base", mariner.getChartImagesBase());

            attrs = makeAttrs(Volantis.PLUGINS_ELEMENT);
            attrs.put("url-rewriter", mariner.getUrlRewriterPluginClass());
            attrs.put("asset-url-rewriter",
                      mariner.getAssetURLRewriterPluginClass());
            attrs.put("asset-transcoder",
                      mariner.getAssetTranscoderPluginClass());

            attrs = makeAttrs(Volantis.CONFIG_PAGE_PACKAGING_MIME);
            attrs.put("enabled", mariner.getPagePackagingMimeEnabled());

            attrs = makeAttrs(Volantis.CONFIG_MAP_COOKIES_ELEMENT);
            attrs.put("enabled", mariner.getSessionProxyCookieMappingEnabled());

        }

        if (debug != null) {
            attrs = makeAttrs(Volantis.CONFIG_DEBUG_ELEMENT);
            attrs.put("logPageOutput", debug.getLogPageOutput());
            attrs.put("comments", debug.getComments());
        }

        if (protocols != null) {
            attrs = makeAttrs(Volantis.CONFIG_PROTOCOLS_ELEMENT);
            attrs.put("preferred-output-format",
                    protocols.getPreferredOutputFormat());
        }


        if (agent != null) {
            attrs = makeAttrs(Volantis.CONFIG_AGENT_ELEMENT);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.configuration.ProtocolsConfiguration

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.