Package com.volantis.mcs.runtime.configuration

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


       
        // Parse the XML and create a configuration object tree from it.
        TestXmlConfigurationBuilder configBuilder =
                new TestXmlConfigurationBuilder(doc);
        configBuilder.setAddDefaultProjects(false);
        MarinerConfiguration config = configBuilder.buildConfiguration();
       
        // Check we got back the top level objects.
        assertNotNull(config);
        ProjectsConfiguration projects = config.getProjects();
        assertNotNull(projects);

        // Test the default project.
        {
            RuntimeProjectConfiguration project = projects.getDefaultProject();
View Full Code Here


            doc += "  </style-sheets> \n";
        }

        TestXmlConfigurationBuilder configBuilder =
                new TestXmlConfigurationBuilder(doc);
        MarinerConfiguration config = configBuilder.buildConfiguration();
        assertNotNull(config);
        StyleSheetsConfig styleConfig = config.getStylesheetConfiguration();
        if (value != null) {
            StyleSheetExternalGenerationConfiguration style =
                    styleConfig.getExternalCacheConfiguration();
            assertNotNull("stylesheetConfiguration", style);
            assertEquals(value.baseUrl, style.getBaseUrl());
View Full Code Here

        }
        doc.append("  </mcs-plugins> \n");
       
        TestXmlConfigurationBuilder configBuilder =
                new TestXmlConfigurationBuilder(doc.toString());
        MarinerConfiguration config = configBuilder.buildConfiguration();
        assertNotNull(config);
        Iterator plugins = config.getMarkupPluginsListIterator();
        if (plugins.hasNext()) {
            MarkupPluginConfiguration mpc =
                    (MarkupPluginConfiguration) plugins.next();
            assertEquals("Name should be the same as specified.",
                    values.getName(), mpc.getName());
View Full Code Here

     * Check the local repository properties values.
     */
    private void checkLocalRepositoryProperties() throws Exception {

        VolantisInternals internals = new VolantisInternals(volantis);
        MarinerConfiguration marinerConfig = internals.getMarinerConfig();

        AbstractPoliciesConfiguration defaultPolicies =
                marinerConfig.getProjects().getDefaultProject().getPolicies();

        // Note: the jdbc repository values are sometimes set even for
        // XML, but it's not a simple decision. We just do this for now,
        // we can make it more complex later if necessary.
        if ("xml".equals(config.repositoryType)) {
            if (config.defaultProjectPolicies != null) {
                ConfigProjectPoliciesXmlValue xml =
                        (ConfigProjectPoliciesXmlValue)
                        config.defaultProjectPolicies;
                Assert.assertTrue("default policies should be JDBC",
                        defaultPolicies instanceof XmlPoliciesConfiguration);
                XmlPoliciesConfiguration xmlPolicies =
                        (XmlPoliciesConfiguration) defaultPolicies;
                Assert.assertEquals(xml.projectDir, xmlPolicies.getDirectory());
            }
        } else {
            if (config.defaultProjectPolicies != null) {
                ConfigProjectPoliciesJdbcValue jdbc =
                        (ConfigProjectPoliciesJdbcValue)
                        config.defaultProjectPolicies;
                Assert.assertTrue("default policies should be XML",
                        defaultPolicies instanceof JdbcPoliciesConfiguration);
                JdbcPoliciesConfiguration jdbcPolicies =
                        (JdbcPoliciesConfiguration) defaultPolicies;
                Assert.assertEquals(jdbc.projectName, jdbcPolicies.getName());
            }


            JDBCRepositoryConfiguration jdbcConfig =
                marinerConfig.getLocalRepository()
                    .getJDBCRepositoryConfiguration();

            ConnectionPoolConfiguration connectionPool = null;
            AnonymousDataSourceConfiguration anonymousDataSource = null;
            MCSDatabaseConfiguration mcsDatabase = null;
View Full Code Here

        // We have implemented VolantisInternals as a workaround rather than
        // use the commented code below to get around a bug to do with
        // reflection in the IBM JDK 1.4.1.
        VolantisInternals internals = new VolantisInternals(volantis);

        MarinerConfiguration marinerConfig = internals.getMarinerConfig();
        RemotePoliciesConfiguration configuration =
                marinerConfig.getRemotePolicies();
        RemotePolicyCacheConfiguration cacheConfiguration =
                configuration.getPolicyCache();

        // @todo this nicely demonstrates the bug re remote cache nesting
        // docs says the global and individual are at different nesting levels
View Full Code Here

        // We have implemented VolantisInternals as a workaround rather than
        // use the commented code below to get around a bug to do with
        // reflection in the IBM JDK 1.4.1.
        VolantisInternals internals = new VolantisInternals(volantis);

        MarinerConfiguration marinerConfig = internals.getMarinerConfig();
        RemotePoliciesConfiguration configuration =
                marinerConfig.getRemotePolicies();
        Iterator i = configuration.getQuotaIterator();
        Map quotaMap = new HashMap();
        while (i.hasNext()) {
            RemotePolicyQuotaConfiguration quota =
                    (RemotePolicyQuotaConfiguration) i.next();
View Full Code Here

            doc += "/></protocols>";
        }
       
        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

            doc += "  /> \n";
        }
       
        TestXmlConfigurationBuilder configBuilder =
                new TestXmlConfigurationBuilder(doc);
        MarinerConfiguration config = configBuilder.buildConfiguration();
        assertNotNull(config);
        AgentConfiguration agent = config.getAgent();
        if (value != null) {
            assertNotNull("agentConfiguration", agent);
            // enabled attribute is tested via the EnabledDigester test case
            assertEquals(value.port, agent.getPort());
            assertEquals(value.password, agent.getPassword());
View Full Code Here

        }
        doc += "  </policy-cache> \n";
       
        TestXmlConfigurationBuilder configBuilder =
                new TestXmlConfigurationBuilder(doc);
        MarinerConfiguration config = configBuilder.buildConfiguration();
        assertNotNull(config);
        PolicyCaches caches = config.getPolicies();
        assertNotNull(caches);
        PolicyCacheFinder cacheFinder = new PolicyCacheFinder();
        PolicyCacheConfiguration cache = cacheFinder.find(caches, tagId);
        if (cacheValue != null) {
            assertNotNull("policyCacheConfiguration", cache);
View Full Code Here

            "</pipeline-configuration>\n";

        TestXmlConfigurationBuilder configBuilder =
            new TestXmlConfigurationBuilder(input);

        MarinerConfiguration actualCfg = configBuilder.buildConfiguration();
        assertNotNull("Main configuration", actualCfg);

        final WSDriverConfiguration config =
                    actualCfg.getPipelineConfiguration().
                        getWsDriverConfiguration();
        assertNotNull("WSDLCatalog", config.getWSDLCatalog());

        WSDLEntry entry = config.getWSDLCatalog().retrieveWSDLEntry(wsdlURI);
        assertNotNull("WSDLEntry", entry);
View Full Code Here

TOP

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

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.