Sample Code snippet:
private String convertToPdfIfRequired(String originalFilePath, String sharedDirectory, int sortOrder) {
if (originalFilePath == null || sharedDirectory == null) {
log.error(“Original file path or …...of("doc", "docx", "xls", "xlsx").contains(extension))...