@Test public void getSrc() { final String expected = "/content/dam/test.mp4.renditions/mp4/asset.rendition"; ctx.currentResource("/content/video"); final Video video = ctx.request().adaptTo(Video.class); assertEquals(expected, video.getSrc()); }
@Override public String getSrc() { if (src == null) { String tmp = null; if (!isLegacyMode()) { if (asset != null && StringUtils.isNotBlank(renditionName)) { final AssetRenditionParameters parameters = new AssetRenditionParameters(asset, renditionName, false); tmp = assetRenditions.getUrl(request, asset, parameters); } } else { tmp = getLegacySrc(); } src = UrlUtil.escape(tmp); } return src; }
VideoImpl extends AbstractEmptyTextComponent implements Video { @Override public String getSrc() { if (src == null) { String tmp = null; if (!isLegacyMode()) { if (asset != null && StringUtils.isNotBlank(renditionName)) { final AssetRenditionParameters parameters = new AssetRenditionParameters(asset, renditionName, false); tmp = assetRenditions.getUrl(request, asset, parameters); } } else { tmp = getLegacySrc(); } src = UrlUtil.escape(tmp); } return src; } }
VideoImpl extends AbstractEmptyTextComponent implements Video { @Override public String getSrc() { if (src == null) { String tmp = null; if (!isLegacyMode()) { if (asset != null && StringUtils.isNotBlank(renditionName)) { final AssetRenditionParameters parameters = new AssetRenditionParameters(asset, renditionName, false); tmp = assetRenditions.getUrl(request, asset, parameters); } } else { tmp = getLegacySrc(); } src = UrlUtil.escape(tmp); } return src; }  }
VideoImpl extends AbstractEmptyTextComponent implements Video { @Override public String getSrc() { if (src == null) { String tmp = null; if (!isLegacyMode()) { if (asset != null && StringUtils.isNotBlank(renditionName)) { final AssetRenditionParameters parameters = new AssetRenditionParameters(asset, renditionName, false); tmp = assetRenditions.getUrl(request, asset, parameters); } } else { tmp = getLegacySrc(); } src = UrlUtil.escape(tmp); } return src; }  @PostConstruct void init(); @Override boolean isEmpty(); @Override boolean isReady(); @Override String getSrc(); @Override boolean isVideoAsset(); @Nonnull @Override String getExportedType(); }
VideoImpl extends AbstractEmptyTextComponent implements Video { @Override public String getSrc() { if (src == null) { String tmp = null; if (!isLegacyMode()) { if (asset != null && StringUtils.isNotBlank(renditionName)) { final AssetRenditionParameters parameters = new AssetRenditionParameters(asset, renditionName, false); tmp = assetRenditions.getUrl(request, asset, parameters); } } else { tmp = getLegacySrc(); } src = UrlUtil.escape(tmp); } return src; }  @PostConstruct void init(); @Override boolean isEmpty(); @Override boolean isReady(); @Override String getSrc(); @Override boolean isVideoAsset(); @Nonnull @Override String getExportedType();  }