Skip to content

Commit

Permalink
Added integrity check on the created file name
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Nov 28, 2023
1 parent b760a6a commit 872deab
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import it.cnr.cool.cmis.model.CoolPropertyIds;
import it.cnr.cool.cmis.service.ACLService;
import it.cnr.cool.cmis.service.CMISService;
import it.cnr.cool.cmis.service.FolderService;
import it.cnr.cool.cmis.service.NodeVersionService;
import it.cnr.cool.exception.CoolUserFactoryException;
import it.cnr.cool.mail.MailService;
Expand Down Expand Up @@ -236,6 +237,8 @@ public class PrintService {
protected GroupService groupService;
@Autowired
protected CacheRepository cacheRepository;
@Autowired
protected FolderService folderService;

@Autowired
protected ApplicationContext context;
Expand Down Expand Up @@ -400,7 +403,7 @@ public String getNameRicevutaReportModel(Session cmisSession, Folder application

return shortNameEnte +
"-" +
call.getPropertyValue(JCONONPropertyIds.CALL_CODICE.value()) +
folderService.integrityChecker(call.getPropertyValue(JCONONPropertyIds.CALL_CODICE.value())) +
"-RD-" +
application.getPropertyValue(JCONONPropertyIds.APPLICATION_USER.value()) +
"-" +
Expand Down Expand Up @@ -1534,7 +1537,7 @@ public String getSchedaValutazioneName(Session cmisSession, Folder application)
dataApplication = formatter.format(dataDomanda.getTime()).replace("/", "_");
return shortNameEnte +
"-" +
call.getPropertyValue(JCONONPropertyIds.CALL_CODICE.value()) +
folderService.integrityChecker(call.getPropertyValue(JCONONPropertyIds.CALL_CODICE.value())) +
"-RD-" +
application.getPropertyValue(JCONONPropertyIds.APPLICATION_USER.value()) +
"-" +
Expand All @@ -1547,7 +1550,7 @@ public String getSchedaAnonimaSinteticaName(Session cmisSession, Folder applicat
Folder call = (Folder) cmisSession.getObject(application.getParentId());
return shortNameEnte +
"-" +
call.getPropertyValue(JCONONPropertyIds.CALL_CODICE.value()) +
folderService.integrityChecker(call.getPropertyValue(JCONONPropertyIds.CALL_CODICE.value())) +
"-RD-" +
String.format("%4s", index).replace(' ', '0') +
".pdf";
Expand Down

0 comments on commit 872deab

Please sign in to comment.