Package org.springframework.core.io

Examples of org.springframework.core.io.InputStreamResource


          log.error(errorMessage);
          throw new SynapseException(errorMessage);
        }

        xbdr.loadBeanDefinitions(
            new InputStreamResource(
                SynapseConfigUtils.getStreamSource(springConfig).getInputStream()));
        appContext.refresh();
        if (synLog.isTraceOrDebugEnabled()) {
            synLog.traceOrDebug("Spring ApplicationContext from key : " + configKey + " created");
        }
View Full Code Here


    /**
     * Create a CompanyModelReader for the specified InputStream.
     * @param stream the input stream
     */
    public CompanyModelReader(InputStream stream) {
        super(new InputStreamResource(stream));
        configureFactory();
    }
View Full Code Here

    public ApplicationContext enrichedContext() throws IOException {
        GenericApplicationContext that=new GenericApplicationContext(applicationContext);
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(that);
        reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
        reader.loadBeanDefinitions(new InputStreamResource(getContextXml()));
        that.refresh();
        return that;
    }
View Full Code Here

     *
     * @param fileName The file name that is associated with the attachment.
     * @param input The input stream from which the attachemnt will be read.
     */
    public AttachmentEmailPreparator(String fileName, InputStream input) {
        this(fileName, new InputStreamResource(input));
    }
View Full Code Here

     *
     * @param id The id that is associated with the attachment.
     * @param input The input stream from which the attachemnt will be read.
     */
    public InlineAttachmentEmailPreparator(String id, InputStream input) {
        this(id, new InputStreamResource(input));
    }
View Full Code Here

            LOG.log(Level.INFO, "BUILD_ENDPOINTS_FROM_CONFIG_LOCATION", new Object[]{location});
            childCtx = new GenericApplicationContext(ctx);
           
            XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(childCtx);
            reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
            reader.loadBeanDefinitions(new InputStreamResource(is, location));
           
            childCtx.refresh();
        }
    }
View Full Code Here

            LOG.log(Level.INFO, "BUILD_ENDPOINTS_FROM_CONFIG_LOCATION", new Object[]{location});
            childCtx = new GenericApplicationContext(ctx);
           
            XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(childCtx);
            reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
            reader.loadBeanDefinitions(new InputStreamResource(is, location));
           
            childCtx.refresh();
        }
    }
View Full Code Here

    private synchronized void buildAppContext(MessageContext synCtx) {
        log.debug("Creating Spring ApplicationContext from property key : " + configKey);
        GenericApplicationContext appContext = new GenericApplicationContext();
        XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(appContext);
        xbdr.setValidating(false);
        xbdr.loadBeanDefinitions(new InputStreamResource(
            Util.getStreamSource(
                    synCtx.getConfiguration().getProperty(configKey)).getInputStream()));
        appContext.refresh();
        this.appContext = appContext;
    }
View Full Code Here

            throw new RuntimeException(
                    "Can't locate resource descriptor in the ClassLoader: "
                            + TEST_RESOURCES_DESCRIPTOR);
        }

        BeanFactory factory = new XmlBeanFactory(new InputStreamResource(in));
        CayenneResources resources = (CayenneResources) factory.getBean(
                "TestResources",
                CayenneResources.class);

        resources.setConnectionKey(System.getProperty(CONNECTION_NAME_KEY));
View Full Code Here

    /**
     * Create a CompanyModelReader for the specified InputStream.
     * @param stream the input stream
     */
    public CompanyModelReader(InputStream stream) {
        super(new InputStreamResource(stream));
        configureFactory();
    }
View Full Code Here

TOP

Related Classes of org.springframework.core.io.InputStreamResource

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.