Package org.apache.isis.core.commons.resource

Examples of org.apache.isis.core.commons.resource.ResourceStreamSourceComposite


       
        final String configLocation = servletContext.getInitParameter(WebAppConstants.CONFIG_DIR_PARAM);
        final ResourceStreamSourceForWebInf rssWebInf = new ResourceStreamSourceForWebInf(servletContext);
        final ResourceStreamSourceContextLoaderClassPath rssContextLoaderClassPath = ResourceStreamSourceContextLoaderClassPath.create();
        final ResourceStreamSourceCurrentClassClassPath rssCurrentClassPath = new ResourceStreamSourceCurrentClassClassPath();
        final ResourceStreamSourceComposite compositeSource = new ResourceStreamSourceComposite(rssWebInf, rssContextLoaderClassPath, rssCurrentClassPath);

        if ( configLocation != null ) {
            LOG.info( "Config override location: " + configLocation );
            compositeSource.addResourceStreamSource(ResourceStreamSourceFileSystem.create(configLocation));
        } else {
            LOG.info( "Config override location: No override location configured!" );
        }
       
        final IsisConfigurationBuilder configurationBuilder = new IsisConfigurationBuilderResourceStreams(compositeSource);
View Full Code Here


            final String webappDir = servletContext.getRealPath("/");
            final String webInfDir = servletContext.getRealPath("/WEB-INF");
            loggingConfigurer.configureLogging(webInfDir, new String[0]);

            final String configLocation = servletContext.getInitParameter(WebAppConstants.CONFIG_DIR_PARAM);
            final ResourceStreamSourceComposite compositeSource = new ResourceStreamSourceComposite(
                    ResourceStreamSourceContextLoaderClassPath.create(),
                    new ResourceStreamSourceForWebInf(servletContext)) ;

            if ( configLocation != null ) {
              LOG.info( "Config override location: " + configLocation );
              compositeSource.addResourceStreamSource(ResourceStreamSourceFileSystem.create(configLocation));
            } else {
              LOG.info( "Config override location: No override location configured" );
            }
           
            // will load either from WEB-INF, from the classpath or from config directory.
View Full Code Here

            final String webappDir = servletContext.getRealPath("/");
            final String webInfDir = servletContext.getRealPath("/WEB-INF");
            loggingConfigurer.configureLogging(webInfDir, new String[0]);

            final String configLocation = servletContext.getInitParameter(WebAppConstants.CONFIG_DIR_PARAM);
            final ResourceStreamSourceComposite compositeSource = new ResourceStreamSourceComposite(
                    ResourceStreamSourceContextLoaderClassPath.create(),
                    new ResourceStreamSourceForWebInf(servletContext)) ;

            if ( configLocation != null ) {
              LOG.info( "Config override location: " + configLocation );
              compositeSource.addResourceStreamSource(ResourceStreamSourceFileSystem.create(configLocation));
            } else {
              LOG.info( "Config override location: No override location configured" );
            }
           
            // will load either from WEB-INF, from the classpath or from config directory.
View Full Code Here

        final String configLocation = servletContext.getInitParameter(WebAppConstants.CONFIG_DIR_PARAM);
        final ResourceStreamSourceForWebInf rssWebInf = new ResourceStreamSourceForWebInf(servletContext);
        final ResourceStreamSourceContextLoaderClassPath rssContextLoaderClassPath = ResourceStreamSourceContextLoaderClassPath.create();
        final ResourceStreamSourceCurrentClassClassPath rssCurrentClassPath = new ResourceStreamSourceCurrentClassClassPath();
        final ResourceStreamSourceComposite compositeSource = new ResourceStreamSourceComposite(rssWebInf, rssContextLoaderClassPath, rssCurrentClassPath);

        if ( configLocation != null ) {
            LOG.info( "Config override location: " + configLocation );
            compositeSource.addResourceStreamSource(ResourceStreamSourceFileSystem.create(configLocation));
        } else {
            LOG.info( "Config override location: No override location configured!" );
        }

        final IsisConfigurationBuilder configurationBuilder = new IsisConfigurationBuilderResourceStreams(compositeSource);
View Full Code Here

        final String configLocation = servletContext.getInitParameter(WebAppConstants.CONFIG_DIR_PARAM);
        final ResourceStreamSourceForWebInf rssWebInf = new ResourceStreamSourceForWebInf(servletContext);
        final ResourceStreamSourceContextLoaderClassPath rssContextLoaderClassPath = ResourceStreamSourceContextLoaderClassPath.create();
        final ResourceStreamSourceCurrentClassClassPath rssCurrentClassPath = new ResourceStreamSourceCurrentClassClassPath();
        final ResourceStreamSourceComposite compositeSource = new ResourceStreamSourceComposite(rssWebInf, rssContextLoaderClassPath, rssCurrentClassPath);

        if ( configLocation != null ) {
            LOG.info( "Config override location: " + configLocation );
            compositeSource.addResourceStreamSource(ResourceStreamSourceFileSystem.create(configLocation));
        } else {
            LOG.info( "Config override location: No override location configured!" );
        }

        final IsisConfigurationBuilder configurationBuilder = new IsisConfigurationBuilderResourceStreams(compositeSource);
View Full Code Here

        final String configLocation = servletContext.getInitParameter(WebAppConstants.CONFIG_DIR_PARAM);
        final ResourceStreamSourceForWebInf rssWebInf = new ResourceStreamSourceForWebInf(servletContext);
        final ResourceStreamSourceContextLoaderClassPath rssContextLoaderClassPath = ResourceStreamSourceContextLoaderClassPath.create();
        final ResourceStreamSourceCurrentClassClassPath rssCurrentClassPath = new ResourceStreamSourceCurrentClassClassPath();
        final ResourceStreamSourceComposite compositeSource = new ResourceStreamSourceComposite(rssWebInf, rssContextLoaderClassPath, rssCurrentClassPath);

        if ( configLocation != null ) {
            LOG.info( "Config override location: " + configLocation );
            compositeSource.addResourceStreamSource(ResourceStreamSourceFileSystem.create(configLocation));
        } else {
            LOG.info( "Config override location: No override location configured!" );
        }

        final IsisConfigurationBuilder configurationBuilder = new IsisConfigurationBuilderResourceStreams(compositeSource);
View Full Code Here

    @SuppressWarnings("unused")
    private static final Logger LOG = Logger.getLogger(IsisConfigurationBuilderFileSystem.class);

    private static ResourceStreamSource createResourceStreamSource(final String... directories) {
        final ResourceStreamSourceComposite composite = new ResourceStreamSourceComposite();
        for (final String directory : directories) {
            composite.addResourceStreamSource(new ResourceStreamSourceFileSystem(directory));
        }
        return composite;
    }
View Full Code Here

    // ////////////////////////////////////////////////////////////
    // Constructor, initialization
    // ////////////////////////////////////////////////////////////

    private static ResourceStreamSource createComposite(final ResourceStreamSource... resourceStreamSources) {
        final ResourceStreamSourceComposite composite = new ResourceStreamSourceComposite();
        for (final ResourceStreamSource rss : resourceStreamSources) {
            if (rss == null) {
                continue;
            }
            composite.addResourceStreamSource(rss);
        }
        return composite;
    }
View Full Code Here

    @SuppressWarnings("unused")
    private static final Logger LOG = Logger.getLogger(IsisConfigurationBuilderFileSystem.class);

    private static ResourceStreamSource createResourceStreamSource(final String... directories) {
        final ResourceStreamSourceComposite composite = new ResourceStreamSourceComposite();
        for (final String directory : directories) {
            composite.addResourceStreamSource(new ResourceStreamSourceFileSystem(directory));
        }
        return composite;
    }
View Full Code Here

        this.resourceStreamSource = resourceStreamSource;
        addDefaultConfigurationResources();
    }

    public IsisConfigurationBuilderResourceStreams(final ResourceStreamSource... resourceStreamSources) {
        final ResourceStreamSourceComposite composite = new ResourceStreamSourceComposite();
        for (final ResourceStreamSource rss : resourceStreamSources) {
            if (rss == null) {
                continue;
            }
            composite.addResourceStreamSource(rss);
        }
        this.resourceStreamSource = composite;
        addDefaultConfigurationResources();
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.commons.resource.ResourceStreamSourceComposite

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.