@Test public void isLegacyMode_NoLegacyConfigOrLegacyMode() { ctx.currentResource("/content/image"); final Image image = ctx.request().adaptTo(Image.class); assertFalse(((ImageImpl) image).isLegacyMode()); }
boolean isLegacyMode() { if (legacyMode == null) { if (StringUtils.isNotBlank(renditionName)) { return false; } else { return StringUtils.isNotBlank(computedProperty) || StringUtils.isNotBlank(renditionRegex); } } else { return legacyMode; } }
ImageImpl extends AbstractEmptyTextComponent implements Image { boolean isLegacyMode() { if (legacyMode == null) { if (StringUtils.isNotBlank(renditionName)) { return false; } else { return StringUtils.isNotBlank(computedProperty) || StringUtils.isNotBlank(renditionRegex); } } else { return legacyMode; } } }
ImageImpl extends AbstractEmptyTextComponent implements Image { boolean isLegacyMode() { if (legacyMode == null) { if (StringUtils.isNotBlank(renditionName)) { return false; } else { return StringUtils.isNotBlank(computedProperty) || StringUtils.isNotBlank(renditionRegex); } } else { return legacyMode; } }  }
ImageImpl extends AbstractEmptyTextComponent implements Image { boolean isLegacyMode() { if (legacyMode == null) { if (StringUtils.isNotBlank(renditionName)) { return false; } else { return StringUtils.isNotBlank(computedProperty) || StringUtils.isNotBlank(renditionRegex); } } else { return legacyMode; } }  @PostConstruct void init(); @Override String getSrc(); @Override String getAlt(); @Override String getFallback(); @Override boolean isEmpty(); @Override boolean isReady(); @Nonnull @Override String getExportedType(); }
ImageImpl extends AbstractEmptyTextComponent implements Image { boolean isLegacyMode() { if (legacyMode == null) { if (StringUtils.isNotBlank(renditionName)) { return false; } else { return StringUtils.isNotBlank(computedProperty) || StringUtils.isNotBlank(renditionRegex); } } else { return legacyMode; } }  @PostConstruct void init(); @Override String getSrc(); @Override String getAlt(); @Override String getFallback(); @Override boolean isEmpty(); @Override boolean isReady(); @Nonnull @Override String getExportedType();  }