Package org.springframework.core.io

Examples of org.springframework.core.io.UrlResource


        HttpEndpoint ep = new HttpEndpoint();
        ep.setService(new QName("http://test", "MyConsumerService"));
        ep.setEndpoint("myConsumer");
        ep.setRoleAsString("consumer");
        ep.setLocationURI("http://localhost:8196/Service/");
        ep.setWsdlResource(new UrlResource("http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"));
        HttpSpringComponent http = new HttpSpringComponent();
        http.setEndpoints(new HttpEndpoint[] { ep });
        container.activateComponent(http, "HttpWsdlTest");
       
        // Start container
View Full Code Here


   * @return the corresponding Resource object
   * @see java.lang.ClassLoader#getResources
   * @see org.springframework.core.io.Resource
   */
  protected Resource convertClassLoaderURL(URL url) {
    return new UrlResource(url);
  }
View Full Code Here

      if (logger.isDebugEnabled()) {
        logger.debug("Found module definition reource URL from bundle context: " + moduleDefinitionResourceURL);
      }
     
      InternalXmlModuleDefinitionSource source = new InternalXmlModuleDefinitionSource(facade.getModuleLocationResolver(), facade.getTypeReaderRegistry());
      source.setResource(new UrlResource(moduleDefinitionResourceURL));
      return source;
    } else {
     
      if (logger.isDebugEnabled()) {
        logger.debug("No module definition reource URL from bundle context");
View Full Code Here

            if (logger.isDebugEnabled()) {
                logger.debug("Found module definition reource URL from bundle context: " + moduleDefinitionResourceURL);
            }
           
            InternalXmlModuleDefinitionSource source = new InternalXmlModuleDefinitionSource(facade.getModuleLocationResolver(), facade.getTypeReaderRegistry());
            source.setResource(new UrlResource(moduleDefinitionResourceURL));
            return source;
        } else {
           
            if (logger.isDebugEnabled()) {
                logger.debug("No module definition reource URL from bundle context");
View Full Code Here

            if (logger.isDebugEnabled()) {
                logger.debug("Found module definition reource URL from bundle context: " + moduleDefinitionResourceURL);
            }
           
            InternalXmlModuleDefinitionSource source = new InternalXmlModuleDefinitionSource(facade.getModuleLocationResolver(), facade.getTypeReaderRegistry());
            source.setResource(new UrlResource(moduleDefinitionResourceURL));
            return source;
        } else {
           
            if (logger.isDebugEnabled()) {
                logger.debug("No module definition reource URL from bundle context");
View Full Code Here

    try {
      List<String> result = new ArrayList<String>();
      Enumeration<URL> urls = classLoader.getResources(FACTORIES_RESOURCE_LOCATION);
      while (urls.hasMoreElements()) {
        URL url = urls.nextElement();
        Properties properties = PropertiesLoaderUtils.loadProperties(new UrlResource(url));
        String factoryClassNames = properties.getProperty(factoryClassName);
        result.addAll(Arrays.asList(StringUtils.commaDelimitedListToStringArray(factoryClassNames)));
      }
      return result;
    }
View Full Code Here

   * @return the corresponding Resource object
   * @see java.lang.ClassLoader#getResources
   * @see org.springframework.core.io.Resource
   */
  protected Resource convertClassLoaderURL(URL url) {
    return new UrlResource(url);
  }
View Full Code Here

   */
  protected Resource resolveRootDirResource(Resource original) throws IOException {
    if (equinoxResolveMethod != null) {
      URL url = original.getURL();
      if (url.getProtocol().startsWith("bundle")) {
        return new UrlResource((URL) ReflectionUtils.invokeMethod(equinoxResolveMethod, null, url));
      }
    }
    return original;
  }
View Full Code Here

      JarFile jarFile = new JarFile(jarFilePath);
      for (Enumeration<JarEntry> entries = jarFile.entries(); entries.hasMoreElements();) {
        JarEntry entry = entries.nextElement();
        String entryPath = entry.getName();
        if (getPathMatcher().match(entryPattern, entryPath)) {
          result.add(new UrlResource(ResourceUtils.URL_PROTOCOL_JAR + ":" +
              ResourceUtils.URL_PROTOCOL_FILE + ":" + jarFilePath +
              ResourceUtils.JAR_URL_SEPARATOR + entryPath));
        }
      }
    }
View Full Code Here

      }
      // classpath -> getResource()
      else {
        URL url = bundle.getResource(resourcePath);
        if (url != null)
          resources.add(new UrlResource(url));
      }
    }

    if (logger.isTraceEnabled()) {
      logger.trace("Fitered " + foundPaths + " to " + resources);
View Full Code Here

TOP

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

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.