[MNT-24555] Set download node name on node creation (#2901)

* [MNT-24555] Set download node name on node creation

* [MNT-24555] PMD scan changes
This commit is contained in:
Tiago Salvado
2024-09-19 09:28:52 +01:00
committed by GitHub
parent b7642b5813
commit 1c1c9704a1
7 changed files with 84 additions and 9 deletions

View File

@@ -712,8 +712,7 @@ public class CustomModelsImpl implements CustomModels
boolean withForm = Boolean.valueOf(propName);
try
{
NodeRef nodeRef = customModelService.createDownloadNode(modelName, withForm);
nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, modelName + DownloadsImpl.DEFAULT_ARCHIVE_EXTENSION);
NodeRef nodeRef = customModelService.createDownloadNode(modelName, withForm, modelName + DownloadsImpl.DEFAULT_ARCHIVE_EXTENSION);
return new CustomModelDownload(nodeRef);
}
catch (Exception ex)