I need to create the delete functionality to delete the contents trought my custom portlet.
I've tested the following sentences but all of them, delete the latest version of the content, but the rest still there.
JournalArticleLocalServiceUtil.deleteArticle(themeDisplay.getCompanyId(), article.getArticleId(), sc);
JournalArticleLocalServiceUtil.deleteJournalArticle(article);
JournalArticleLocalServiceUtil.deleteArticle(article);
JournalArticleLocalServiceUtil.deleteArticle(article, SLASH, sc);
JournalArticleServiceUtil.deleteArticle(themeDisplay.getCompanyGroupId(), article.getArticleId(), SLASH, sc);
Is there any method in Liferay API to delete all the versions or I have to loop over the version and delete it one by one?