Examples of AssetLocator


Examples of com.github.dandelion.core.asset.locator.spi.AssetLocator

      Set<Asset> processedAssets = assetMapper.mapToAssets(filteredAsus);
 
      Map<String, AssetLocator> locators = getContext().getAssetLocatorsMap();
 
      for (Asset asset : processedAssets) {
        AssetLocator locator = locators.get(asset.getConfigLocationKey());
        String content = locator.getContent(asset, request);
 
        if (!content.endsWith("\n")) {
          content += "\n";
        }
View Full Code Here

Examples of com.github.dandelion.core.asset.locator.spi.AssetLocator

      throw new DandelionException(msg.toString());
    }

    // Otherwise check for the locator
    String location = null;
    AssetLocator locator = locators.get(locationKey);
    if (locators.containsKey(locationKey) && locators.get(locationKey).isActive()) {
      LOG.trace("Locator '{}' will be applied on the asset {}.", locator.getClass().getSimpleName(), asu.toLog());
      location = locators.get(locationKey).getLocation(asu, request);
    }

    asset.setConfigLocationKey(locationKey);
    asset.setConfigLocation(asu.getLocations().get(locationKey));

    if (locator.isCachingForced() || this.context.getConfiguration().isMinificationEnabled()) {
      String context = UrlUtils.getCurrentUrl(request, true).toString();
      context = context.replaceAll("\\?", "_").replaceAll("&", "_");
      String cacheKey = this.context.getCacheManager().generateCacheKey(context, asset);
      asu.setCacheKey(cacheKey);
      asset.setCacheKey(cacheKey);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.