Examples of RuntimeProjectConfiguration


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

     */
    public RuntimeProjectConfiguration readProject(
            Reader reader, final String systemID)
            throws IOException {

        RuntimeProjectConfiguration readObject = (RuntimeProjectConfiguration)
                jibxReader.read(new TextContentInput(reader), systemID);

        return readObject;
    }
View Full Code Here

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

     */
    public RuntimeProjectConfiguration readProject(
            InputStream stream, final String url)
            throws IOException {

        RuntimeProjectConfiguration readObject = (RuntimeProjectConfiguration)
                jibxReader.read(new BinaryContentInput(stream), url);

        return readObject;
    }
View Full Code Here

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

        Reader reader = new CharArrayReader(sourceXML.toCharArray());

        ProjectConfigurationReader projectReader = new ProjectConfigurationReader();
        String expectedLocation = name;
        RuntimeProjectConfiguration configuration =
                projectReader.readProject(reader, expectedLocation);

        checkConfiguration(configuration, expectedLocation);

    }
View Full Code Here

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

        URL url = getClass().getResource(name);
        InputStream stream = url.openStream();

        ProjectConfigurationReader projectReader = new ProjectConfigurationReader();
        String expectedLocation = url.toExternalForm();
        RuntimeProjectConfiguration configuration =
                projectReader.readProject(stream, expectedLocation);

        checkConfiguration(configuration, expectedLocation);
    }
View Full Code Here

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

        ProjectsConfiguration projects = config.getProjects();
        assertNotNull(projects);

        // Test the default project.
        {
            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());

            AssetsConfiguration assets = project.getAssets();
            assertNotNull(assets);
            AssetConfiguration dynvisAssets = assets.getDynamicVisualAssets();
            assertNotNull(dynvisAssets);
            assertEquals("", "another/prefix/url", dynvisAssets.getPrefixUrl());

            GeneratedResourcesConfiguration resources =
                    project.getGeneratedResources();
            assertNotNull(resources);
            assertEquals("", "custom-resources", resources.getBaseDir());
        }
    }
View Full Code Here

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

                // Get a URL for the resource.
                String localURLAsString =
                        resourceMapper.getLocalURL(resourcePath);

                // It's not in the cache, so load and cache it.
                RuntimeProjectConfiguration configuration = null;
                try {
                    configuration = projectLoader.loadProjectConfiguration(
                            localURLAsString, null);
                } catch (JiBXException e) {
                    throw new ServletException(e);
View Full Code Here

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

    private String createClientConfiguration(
            RuntimeProjectConfiguration local)
            throws ServletException {

        // Create the configuration for the client.
        RuntimeProjectConfiguration client = new RuntimeProjectConfiguration();

        // Copy only those properties that are supported for remote projects.
        client.setAssets(local.getAssets());
        client.setDefaultProjectLayoutLocator(
                local.getDefaultProjectLayoutLocator());
        client.setFallbackProjectName(local.getFallbackProjectName());
        client.setName(local.getName());
        client.setProjectThemes(local.getProjectThemes());

        // The client never knows where the policies are stored, they are
        // always accessed through this class.
        client.setPolicies(null);

        StringWriter stringWriter = new StringWriter();
        ProjectConfigurationWriter writer = new ProjectConfigurationWriter();
        try {
            writer.writeProject(client, stringWriter);
View Full Code Here

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

            String url, ProjectLoadingOptimizer optimizer)
            throws IOException {

        Path path = createPath(url);

        RuntimeProjectConfiguration configuration = null;

        // The list of visited paths (stored as Strings).
        List visited = null;

        Path parent = null;
View Full Code Here

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

     * @param projectFile The path.
     * @return The
     */
    protected RuntimeProjectConfiguration loadConfiguration(Path projectFile) {

        RuntimeProjectConfiguration configuration = null;
        try {
            InputStream stream = null;
            try {
                stream = projectFile.openStream();
                String url = projectFile.toExternalForm();
View Full Code Here

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

     *         {@link com.volantis.mcs.runtime.RuntimeProject} for this request
     */
    protected RuntimeProjectConfiguration createProjectConfiguration(
            InputStream projectStream, String url) throws IOException {

        RuntimeProjectConfiguration projectConfiguration = null;
        if (projectStream != null) {
            InputStreamReader projectReader =
                    new InputStreamReader(projectStream);
            ProjectConfigurationReader projectConfigurationReader
                    = new ProjectConfigurationReader();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.