deleting web content programmatically in liferay 6.0

714 Views Asked by At

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.

1

There are 1 best solutions below

2
On

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.