class SystemApiController implements SystemApi {

    @Override
    @PreAuthorize("hasAuthority('DOWNLOAD_ANCHOR')")
    public ResponseEntity<Resource> downloadAnchor() {
        try {
            return ApiUtil.createAttachmentResourceResponse(systemService.readAnchorFile(),
                    systemService.getAnchorFilenameForDownload());
        } catch (AnchorNotFoundException e) {
            throw new InternalServerErrorException(new ErrorDeviation(ANCHOR_FILE_NOT_FOUND));
        }
    }

    @Autowired public  SystemApiController(InternalTlsCertificateService internalTlsCertificateService,
            CertificateDetailsConverter certificateDetailsConverter, SystemService systemService,
            TimestampingServiceConverter timestampingServiceConverter, AnchorConverter anchorConverter,
            VersionService versionService, VersionConverter versionConverter, CsrFilenameCreator csrFilenameCreator,
            AuditDataHelper auditDataHelper);

}