Package org.webjars

Examples of org.webjars.WebJarAssetLocator


    return projectClassLoader.getResourceAsStream(fullPath);
  }

  private WebJarAssetLocator createWebJarAssetLocator() {
    SortedMap<String, String> fullPathIndex = getFullPathIndex(Pattern.compile(".*"), projectClassLoader);
    return new WebJarAssetLocator(fullPathIndex);
  }
View Full Code Here


  /**
   * @return an instance of {@link WebJarAssetLocator} to be used for identifying the fully qualified name of resources
   *         based on provided partial path.
   */
  private WebJarAssetLocator newWebJarAssetLocator() {
    return new WebJarAssetLocator(WebJarAssetLocator.getFullPathIndex(
        Pattern.compile(".*"), Thread.currentThread().getContextClassLoader()));
  }
View Full Code Here

        //
        Boolean strip = (Boolean)webJar.get("stripVersion");

        //
        WebJarAssetLocator locator = new WebJarAssetLocator();
        String folderPath = "/" + id + "/" + version;
        Set<String> assetsPaths = locator.listAssets(folderPath);
        log.info("Webjars " + webJar + " resolved assets " + assetsPaths + " from " + folderPath);
        for (String assetPath : assetsPaths) {
          URL assetURL = WebJarAssetLocator.class.getClassLoader().getResource(assetPath);
          if (assetURL != null) {
            String dst = assetPath.substring(WebJarAssetLocator.WEBJARS_PATH_PREFIX.length() + 1);
View Full Code Here

TOP

Related Classes of org.webjars.WebJarAssetLocator

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.