Package com.volantis.mcs.runtime.configuration

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


       
        TestXmlConfigurationBuilder configBuilder =
                new TestXmlConfigurationBuilder(doc);
        MarinerConfiguration config = configBuilder.buildConfiguration();
        assertNotNull(config);
        AppServerConfiguration appServer = config.getAppServer();
        if (value != null) {
            assertNotNull("appServerConfiguration", appServer);
            assertEquals(value.baseUrl, appServer.getBaseUrl());
            assertEquals(value.internalUrl, appServer.getInternalUrl());
            assertEquals(value.pageBase, appServer.getPageBase());
            assertEquals(value.appServerName, appServer.getAppServerName());
            assertEquals(value.useServerConnectionPool, appServer.getUseServerConnectionPool());
            assertEquals(value.jndiProvider, appServer.getJndiProvider());
            assertEquals(value.datasourceVendor, appServer.getDatasourceVendor());
            assertEquals(value.datasource, appServer.getDatasource());
            assertEquals(value.user, appServer.getUser());
            assertEquals(value.password, appServer.getPassword());
            assertEquals(value.anonymous, appServer.getAnonymous());
        } else {
            assertNull("appServerConfiguration", appServer);
        }
    }
View Full Code Here


        configBuilder.addApplicationPluginRuleSet(new MpsPluginRuleSet());
        mariner = configBuilder.buildConfiguration();

        // 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);
            attrs.put("enabled", "true"); // corresponds to Enabled.
            attrs.put("password", agent.getPassword());
            attrs.put("port", agent.getPort());
        }

        if (appServer != null) {
            attrs = makeAttrs(Volantis.CONFIG_WEBAPP_ELEMENT);
            attrs.put("base-url", appServer.getBaseUrl());
            attrs.put("internal-url", appServer.getInternalUrl());
            attrs.put("app-server-name", appServer.getAppServerName());
            attrs.put("use-server-connection-pool", appServer.getUseServerConnectionPool());
            attrs.put("jndi-provider", appServer.getJndiProvider());
            attrs.put("datasource", appServer.getDatasource());
            attrs.put("page-base", appServer.getPageBase());
            attrs.put("datasource-vendor", appServer.getDatasourceVendor());
            attrs.put("user", appServer.getUser());
            attrs.put("password", appServer.getPassword());
            attrs.put("anonymous", appServer.getAnonymous());
        }
    }
View Full Code Here

TOP

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

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.