Package com.volantis.xml.pipeline.sax.config

Examples of com.volantis.xml.pipeline.sax.config.XMLPipelineConfiguration


     * PipelineInitialization is valid
     * @throws Exception if an error occurs
     */
    public void testGetPipelineConfiguration() throws Exception {
        // invoke the method we are testing and retrieve the configuration
        XMLPipelineConfiguration config =
                    pi.getPipelineFactory().createPipelineConfiguration();

        // ensure that a DynamicProcessConfiguration was added
        assertNotNull("DynamicProcessConfiguration was not added to " +
                      "Pipeline configuration",
                      config.retrieveConfiguration(
                              DynamicProcessConfiguration.class));

        // ensure the the Web Driver configuration was added
        assertNotNull("WebDriverConfiguration was not added to " +
                   "Pipeline configuration",
                   config.retrieveConfiguration(
                           WebDriverConfiguration.class));
       
        // ensure the the Cache configuration was added
        assertNotNull("CacheProcessConfiguration was not added to " +
                      "Pipeline configuration",
                      config.retrieveConfiguration(
                              CacheProcessConfiguration.class));
       
        // ensure the the Web Service configuration was added
        assertNotNull("WebServiceConfiguration was not added to " +
                      "Pipeline configuration",
                      config.retrieveConfiguration(
                              WSDriverConfiguration.class));

    }
View Full Code Here


        // get hold of the pipeline context
        XMLPipelineContext context = getPipelineContext();


        // get hold of the pipeline configuration
        XMLPipelineConfiguration pipelineConfiguration =
                context.getPipelineConfiguration();

        // retrieve the configuration
        Configuration config =
                pipelineConfiguration.retrieveConfiguration(
                        ProxySessionIdOperationProcess.class);

        if (config == null ||
                !(config instanceof ProxySessionIdConfiguration)) {
            // cannot get hold of the configuration. As this is fatal
View Full Code Here

        ExpressionContext expressionContext =
            MCSExpressionHelper.getExpressionContext(context);

            // create the pipeline configuration. This particular factory will
            // create a configuration based on the MCS config file.
            XMLPipelineConfiguration pipelineConfiguration =
                factory.createPipelineConfiguration();

            XMLPipelineContext pipelineContext =
                    factory.createPipelineContext(pipelineConfiguration,
                                                  expressionContext);
View Full Code Here

        XMLPipelineFactory pipelineFactory =
                XMLPipelineFactory.getDefaultInstance();
        // factor an empty XMLPipelineConfiguration instance. This is the
        // configuration that is required to run the pipeline.
        XMLPipelineConfiguration pipelineConfig =
                pipelineFactory.createPipelineConfiguration();

        PipelineConfiguration configFileInfo =
                marinerConfiguration.getPipelineConfiguration();

        // Create the caches
        final CacheProcessConfiguration cacheProcessConfiguration;
        final CacheOperationConfiguration cacheOperationConfiguration =
            configFileInfo.getCacheOperationConfiguration();
        if (cacheOperationConfiguration != null) {
            // @todo this seems a bit inefficient, iterating over the same
            // collection twice. But the collection is expected to be small.
            // Leaving for now.
            int cacheSize = calculateTotalMaxEntries(
                    cacheOperationConfiguration.getCacheConfigurations());
            cacheProcessConfiguration = new CacheProcessConfiguration();
            createCaches(cacheProcessConfiguration,
                cacheOperationConfiguration.getCacheConfigurations());
            cacheProcessConfiguration.setFixedExpiryMode(
                cacheOperationConfiguration.isFixedExpiryMode());
        } else {
            cacheProcessConfiguration = new CacheProcessConfiguration();
        }

        pipelineConfig.storeConfiguration(CacheProcessConfiguration.class,
                cacheProcessConfiguration);

        // Store the web services driver configuration in the pipeline
        // configurations class so that registration of web services
        // process' may occur.
        WSDriverConfiguration wsDriverConfiguration =
                (configFileInfo.getWsDriverConfiguration() != null)
                ? configFileInfo.getWsDriverConfiguration()
                : new WSDriverConfiguration();

        pipelineConfig.storeConfiguration(WSDriverConfiguration.class,
                wsDriverConfiguration);

        WebDriverConfiguration webDriverConfiguration =
                (configFileInfo.getWebDriverConfiguration() != null)
                ? configFileInfo.getWebDriverConfiguration()
                : WebDriverFactory.getDefaultInstance().createConfiguration();
        pipelineConfig.storeConfiguration(WebDriverConfiguration.class,
                webDriverConfiguration);

        // Store the transformation configuration in the pipeline
        // configurations class so that registration of transformation
        // process may occur. The transformation configuration determines
        // whether xslt or xsltc is used by default.

        TransformConfiguration transformConfiguration =
                (configFileInfo.getTransformConfiguration() != null)
                ? configFileInfo.getTransformConfiguration()
                : PipelineOperationFactory.getDefaultInstance().
                createTransformConfiguration();

        if(LOGGER.isInfoEnabled()){
            if(transformConfiguration.isTemplateCacheRequired()){
                LOGGER.info("transformation-cache-enabled");
            } else {
                LOGGER.info("transformation-cache-disabled");
            }
        }

        // store away the configuration for transforms
        pipelineConfig.storeConfiguration(TransformConfiguration.class,
                transformConfiguration);

        // Store the connection configuration away in the pipeline
        // configuration. This may be null if no configuration is specified
        ConnectionConfigurationImpl connectionConfiguration =
                (ConnectionConfigurationImpl)
                configFileInfo.getConnectionConfiguration();
        pipelineConfig.storeConfiguration(
                ConnectionConfiguration.class,
                connectionConfiguration);

        // Store the URLContentCache configuration if we have a connection
        // configuration.
        final URLContentCacheConfiguration urlContentCacheConfig =
            new URLContentCacheConfiguration(pipelineConfig);
        pipelineConfig.storeConfiguration(URLContentCacheConfiguration.class,
            urlContentCacheConfig);


        // Store the URL to URLC configuration in the pipeline
        // configurations instance so that registration of converter(s)
        // may occur.
        URLToURLCTuple[] tuples =
                {new URLToURLCTuple(null, "img", "url", "urlc"),
                 new URLToURLCTuple(null, "logo", "url", "urlc")};

        pipelineConfig.storeConfiguration(
                URLToURLCConfiguration.class,
                new URLToURLCConfiguration(
                        new TranscoderURLConverter(
                                assetTranscoder.getHostParameter(),
                                assetTranscoder.getPortParameter()),
                        tuples));


        // store away the configuration for the absolute to relative URL
        // converter process
        pipelineConfig.storeConfiguration(
                AbsoluteToRelativeURLConfiguration.class,
                createAbsoluteToRelativeURLConfiguration());

        // create the dynamic configuration
        DynamicProcessConfiguration dynamicConfiguration =
                pipelineFactory.createDynamicProcessConfiguration();

        // get hold of all the rules need for testing
        DynamicRuleConfigurator ruleConfigurator =
                pipelineFactory.getRuleConfigurator();

        // configure the dynamic configuration
        ruleConfigurator.configure(dynamicConfiguration);

        // add the rules that are specified via markup extensions
        addMarkupExtensionRules(configFileInfo, dynamicConfiguration);

        // add the extra MCS only rules
        addAdditionalRules(dynamicConfiguration);

        // store the dynamic configuration away in the pipeline configuration
        pipelineConfig.storeConfiguration(
                DynamicProcessConfiguration.class,
                dynamicConfiguration);

        // allow extensions to add information to the pipeline configuration
        PipelineConfigurationExtensionFactory.getDefaultInstance().
View Full Code Here

        expressionContext =
            MCSExpressionHelper.getExpressionContext(requestContext);

        // create the pipeline configuration. This particular factory will
        // create a configuration based on the MCS config file.
        XMLPipelineConfiguration pipelineConfiguration =
                    factory.createPipelineConfiguration();

        if (expressionContext != null) {
            // We have a valid expression context already set up for us so
            // use this when creating a new pipeline context
View Full Code Here

        protected XMLFilter createFilter() throws Exception {

            XMLPipelineFactory factory =
                    XMLPipelineFactory.getDefaultInstance();
            XMLPipelineConfiguration configuration =
                    factory.createPipelineConfiguration();
            DynamicProcessConfiguration dynamic =
                    factory.createDynamicProcessConfiguration();
            configuration.storeConfiguration(DynamicProcessConfiguration.class,
                    dynamic);
            TemplateFactory templateFactory =
                    TemplateFactory.getDefaultInstance();
            templateFactory.getRuleConfigurator().configure(dynamic);
            URIDriverFactory uriDriverFactory =
View Full Code Here

     * URLContentCacheConfiguration object.
     *
     * @return the Cache.
     */
    private URLContentCacheConfiguration retrieveURLContentCacheConfiguration() {
        final XMLPipelineConfiguration config =
                pipelineInitialization.getPipelineConfiguration();
        final URLContentCacheConfiguration cpc = (URLContentCacheConfiguration)
                config.retrieveConfiguration(URLContentCacheConfiguration.class);
        return cpc;
    }
View Full Code Here

     * CacheProcessConfiguration object.
     *
     * @return the Cache.
     */
    private CacheProcessConfiguration retrievePipelineCacheProcessConfiguration() {
        final XMLPipelineConfiguration config =
                pipelineInitialization.getPipelineConfiguration();
        final CacheProcessConfiguration cpc = (CacheProcessConfiguration)
                config.retrieveConfiguration(CacheProcessConfiguration.class);
        return cpc;
    }
View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.config.XMLPipelineConfiguration

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.