String getAssetURL(Asset asset) { StringBuilder sb = new StringBuilder(); try { renderAssetURL(asset.getLocation(), asset.resolveURI(bridge.getRunMode().getMinifyAssets()), sb); } catch (IOException e) { // Should not happen throw new UndeclaredIOException(e); } return sb.toString(); } }
String getAssetURL(Asset asset) { StringBuilder sb = new StringBuilder(); try { renderAssetURL(asset.getLocation(), asset.resolveURI(bridge.getRunMode().getMinifyAssets()), sb); } catch (IOException e) { // Should not happen throw new UndeclaredIOException(e); } return sb.toString(); } }
public static String renderAssetURLById(String id) throws NullPointerException { Request request = Request.getCurrent(); if (request != null) { AssetManager assetManager = request.getApplication().resolveBean(AssetManager.class); if (assetManager != null) { Asset asset = assetManager.getAsset(id); if (asset != null) { String uri = asset.resolveURI(request.getRunMode().getMinifyAssets()); return renderAssetURL(request, asset.getLocation(), uri); } } } return null; }
public static String renderAssetURLById(String id) throws NullPointerException { Request request = Request.getCurrent(); if (request != null) { AssetManager assetManager = request.getApplication().resolveBean(AssetManager.class); if (assetManager != null) { Asset asset = assetManager.getAsset(id); if (asset != null) { String uri = asset.resolveURI(request.getRunMode().getMinifyAssets()); return renderAssetURL(request, asset.getLocation(), uri); } } } return null; }
stream = new WebStream((HttpStream)stream, assetManager, getRunMode().getMinifyAssets(), phase) { @Override public String renderAssetURL(AssetLocation location, String uri) {
stream = new WebStream((HttpStream)stream, assetManager, getRunMode().getMinifyAssets(), phase) { @Override public String renderAssetURL(AssetLocation location, String uri) {