Package com.github.dandelion.core.asset

Examples of com.github.dandelion.core.asset.AssetMapper


  }

  @Override
  public void setup(HtmlTable table) {

    AssetMapper assetMapper = new AssetMapper(table.getTableConfiguration().getRequest(), getContext());
   
    HttpServletRequest request = table.getTableConfiguration().getRequest();
    Set<AssetStorageUnit> assetsToInject = null;
   
    for (ExtraJs extraJs : table.getTableConfiguration().getExtraJs()) {
     
      assetsToInject = new LinkedHashSet<AssetStorageUnit>();
 
//      AssetQuery aq = new AssetQuery(table.getTableConfiguration().getRequest(), getContext()).;
      for(String bundleName : extraJs.getBundles()){
        assetsToInject.addAll(getContext().getBundleStorage().getBundleDag().getVertex(bundleName).getAssetStorageUnits());
      }

      Set<AssetStorageUnit> filteredAsus = new LinkedHashSet<AssetStorageUnit>();
      for (AssetStorageUnit asu: assetsToInject) {
        if (asu.getType().equals(AssetType.js)) {
          filteredAsus.add(asu);
        }
      }
     
      Set<Asset> processedAssets = assetMapper.mapToAssets(filteredAsus);
 
      Map<String, AssetLocator> locators = getContext().getAssetLocatorsMap();
 
      for (Asset asset : processedAssets) {
        AssetLocator locator = locators.get(asset.getConfigLocationKey());
View Full Code Here


  }

  public String getView(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
      throws IOException, ServletException {

    assetMapper = new AssetMapper(request, context);
    StringBuilder sbNodesRequest = new StringBuilder();
    StringBuilder sbNodesApplication = new StringBuilder();
    StringBuilder sbHead = new StringBuilder();
    StringBuilder sbBody = new StringBuilder();
View Full Code Here

TOP

Related Classes of com.github.dandelion.core.asset.AssetMapper

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.