public DownloadCommand(TemplateObjectTO template, Long maxDownloadSizeInBytes) { super(template.getName(), template.getOrigUrl(), template.getFormat(), template.getAccountId()); _store = template.getDataStore(); installPath = template.getPath(); hvm = template.isRequiresHvm(); checksum = template.getChecksum(); id = template.getId(); description = template.getDescription(); if (_store instanceof NfsTO) { setSecUrl(((NfsTO) _store).getUrl()); } this.maxDownloadSizeInBytes = maxDownloadSizeInBytes; }