@Override protected void expireBaseModelVersions( BaseModel<?> baseModel, boolean expireAllVersions, ServiceContext serviceContext) throws Exception { JournalArticle article = (JournalArticle) baseModel; if (expireAllVersions) { JournalArticleLocalServiceUtil.expireArticle( article.getUserId(), article.getGroupId(), article.getArticleId(), article.getUrlTitle(), serviceContext); } else { JournalArticleLocalServiceUtil.expireArticle( article.getUserId(), article.getGroupId(), article.getArticleId(), article.getVersion(), article.getUrlTitle(), serviceContext); } }
@Override protected BaseModel<?> expireBaseModel(BaseModel<?> baseModel, ServiceContext serviceContext) throws Exception { JournalArticle article = (JournalArticle) baseModel; return JournalArticleLocalServiceUtil.expireArticle( article.getUserId(), article.getGroupId(), article.getArticleId(), article.getVersion(), StringPool.BLANK, serviceContext); }