I am new to liferay. I am developing delete scheduler, which has to delete documents programatically based on some condition. using DLfileLocalServiceUtil.deleteFileEntry(id)
I can delete it, but it is deleting only entry in DlfileEntry
table not the actual file stored in file system in server in data folder.
Asked
Active
Viewed 697 times
0

marc_s
- 732,580
- 175
- 1,330
- 1,459
1 Answers
0
DLfileLocalServiceUtil is used for managing Documents. You need to use 'JournalArticle*Util' APIs to deal with Web Contents. There are multiple Util classes for different purpose. You'll perhaps need JournalArticleLocalServiceUtil.deleteJournalArticle() methods for deleting the web contents.

Rushikesh Thakkar
- 713
- 4
- 14
-
**But pay attention!** Calling `*LocalServiceUtil` delete method is the wrong way to delete an asset. You have to use XXXServiceUtil! – Daniele Baggio Nov 10 '14 at 09:24
-
Yes, it is better to use ServiceUtil vs LocalServiceUtil for security reasons (and may be more). – Rushikesh Thakkar Nov 10 '14 at 23:01