I have tried the below.
@Model(
adaptables = {SlingHttpServletRequest.class},
adapters = {Download.class, ComponentExporter.class},
resourceType = "mysite/components/modals/download",
defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL
)
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class DownloadImpl implements Download {
private Logger LOG = LoggerFactory.getLogger(DownloadImpl.class);
@Self @Via(type = ResourceSuperType.class)
private Download download;
@Override
public Collection<AssetModel> getAssets() {
return download.getAssets();
}
@Override
public String getZipFileName() {
return download.getZipFileName();
}
@Override
public long getMaxContentSize() {
return download.getMaxContentSize();
}
@Override
public long getDownloadContentSize() {
return download.getDownloadContentSize();
}
@Override
public String getMaxContentSizeLabel() {
return download.getMaxContentSizeLabel();
}
@Override
public String getDownloadContentSizeLabel() {
return download.getDownloadContentSizeLabel();
}
@Override
public boolean isAsynchronous() {
return download.isAsynchronous();
}
}