@Override
public FileData retrieveFileData(final String entityType, final Long entityId, final Long documentId) {
try {
final DocumentMapper mapper = new DocumentMapper(false, false);
final DocumentData documentData = fetchDocumentDetails(entityType, entityId, documentId, mapper);
final ContentRepository contentRepository = this.contentRepositoryFactory.getRepository(documentData.storageType());
return contentRepository.fetchFile(documentData);
} catch (final EmptyResultDataAccessException e) {
throw new DocumentNotFoundException(entityType, entityId, documentId);
}
}