Package com.volantis.mcs.runtime.configuration.project

Examples of com.volantis.mcs.runtime.configuration.project.AbstractPoliciesConfiguration


        {
            RuntimeProjectConfiguration project = projects.getDefaultProject();
            assertNotNull(project);
            assertEquals("", Boolean.TRUE, project.getPreload());

            AbstractPoliciesConfiguration policies =
                    project.getPolicies();
            assertNotNull(policies);
            assertTrue(policies instanceof XmlPoliciesConfiguration);
            XmlPoliciesConfiguration xmlPolicies =
                    (XmlPoliciesConfiguration) policies;
            assertEquals("", "an xml dir", xmlPolicies.getDirectory());

            AssetsConfiguration assets = project.getAssets();
            assertNotNull(assets);
            AssetConfiguration audioAssets = assets.getAudioAssets();
            assertNotNull(audioAssets);
            assertEquals("", "a/prefix/url", audioAssets.getPrefixUrl());

            GeneratedResourcesConfiguration resources =
                    project.getGeneratedResources();
            assertNotNull(resources);
            assertEquals("", "default-resources", resources.getBaseDir());
        }

        // Test the single named project which was present.
        {
            RuntimeProjectConfiguration project = (RuntimeProjectConfiguration)
                    projects.getNamedProjects().values().iterator().next();
            assertNotNull(project);
            assertEquals("", "a/project", project.getName());

            AbstractPoliciesConfiguration policies = project.getPolicies();
            assertNotNull(policies);
            assertTrue(policies instanceof JdbcPoliciesConfiguration);
            JdbcPoliciesConfiguration jdbcPolicies =
                    (JdbcPoliciesConfiguration) policies;
            assertEquals("", "a jdbc policy", jdbcPolicies.getName());
View Full Code Here


    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.
View Full Code Here

        // request URI.
        URL externalURL = new URL(hostURL, hostRelativeProjectRoot);
        String externalProjectRoot = externalURL.toExternalForm();

        // Sort out the policies accessor.
        AbstractPoliciesConfiguration policies = local.getPolicies();
        ResourceAccessor policiesAccessor = null;

        // We only support xml policy sources for remote projects at
        // the moment - anything else is treated as if no policy source
        // was specified.
View Full Code Here

    private void configureBuilder(
            RuntimeProjectBuilder builder,
            RuntimeProjectConfiguration configuration,
            RuntimePolicySourceFactory policySourceFactory) {

        AbstractPoliciesConfiguration policies =
                configuration.getPolicies();

        // Only configurations loaded from an mcs-project.xml file have the
        // location set and this only works if the location has been set.
        String location = configuration.getLocation();
View Full Code Here

            RuntimeProject fallbackProject = getFallbackProject(configuration,
                    dependencyPath, namedProjects);
            builder.setBaseProject(fallbackProject);

            // Initialise the policy source.
            AbstractPoliciesConfiguration policies = configuration.getPolicies();

            PolicySource policySource = selector.selectPolicySource(
                    policies, false);
            builder.setPolicySource(policySource);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.configuration.project.AbstractPoliciesConfiguration

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.