@Test public void isLegacyMode_Yes() { ctx.currentResource("/content/download_legacy"); final Download download = ctx.request().adaptTo(Download.class); assertTrue("Should be legacy mode", ((DownloadImpl)download).isLegacyMode()); }
@Deprecated protected boolean isLegacyMode() { if (legacyMode == null) { if (getAssetRenditionsGroups() != null && !getAssetRenditionsGroups().isEmpty()) { return false; } else { return excludeOriginalAssets != null; } } else { return legacyMode; } }
DownloadImpl implements Download, ComponentExporter { @Deprecated protected boolean isLegacyMode() { if (legacyMode == null) { if (getAssetRenditionsGroups() != null && !getAssetRenditionsGroups().isEmpty()) { return false; } else { return excludeOriginalAssets != null; } } else { return legacyMode; } } }
DownloadImpl implements Download, ComponentExporter { @Deprecated protected boolean isLegacyMode() { if (legacyMode == null) { if (getAssetRenditionsGroups() != null && !getAssetRenditionsGroups().isEmpty()) { return false; } else { return excludeOriginalAssets != null; } } else { return legacyMode; } }  }
DownloadImpl implements Download, ComponentExporter { @Deprecated protected boolean isLegacyMode() { if (legacyMode == null) { if (getAssetRenditionsGroups() != null && !getAssetRenditionsGroups().isEmpty()) { return false; } else { return excludeOriginalAssets != null; } } else { return legacyMode; } }  @Override List<AssetRenditionsGroup> getAssetRenditionsGroups(); Collection<AssetModel> getAssets(); String getZipFileName(); @Override long getMaxContentSize(); @Override long getDownloadContentSize(); @Override String getMaxContentSizeLabel(); @Override String getDownloadContentSizeLabel(); @Nonnull @Override String getExportedType(); }
DownloadImpl implements Download, ComponentExporter { @Deprecated protected boolean isLegacyMode() { if (legacyMode == null) { if (getAssetRenditionsGroups() != null && !getAssetRenditionsGroups().isEmpty()) { return false; } else { return excludeOriginalAssets != null; } } else { return legacyMode; } }  @Override List<AssetRenditionsGroup> getAssetRenditionsGroups(); Collection<AssetModel> getAssets(); String getZipFileName(); @Override long getMaxContentSize(); @Override long getDownloadContentSize(); @Override String getMaxContentSizeLabel(); @Override String getDownloadContentSizeLabel(); @Nonnull @Override String getExportedType(); static final String PN_ASSET_RENDITIONS_GROUP_TITLE; static final String NN_ASSET_RENDITIONS; static final String NN_ITEMS; }