Search in sources :

Example 1 with Subscription

use of com.liferay.portal.model.Subscription in project liferay-ide by liferay.

the class KBArticleLocalServiceImpl method deleteGroupKBArticles.

@Override
public void deleteGroupKBArticles(long groupId) throws PortalException, SystemException {
    // KB articles
    deleteKBArticles(groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID);
    // Subscriptions
    Group group = groupLocalService.getGroup(groupId);
    List<Subscription> subscriptions = subscriptionLocalService.getSubscriptions(group.getCompanyId(), KBArticle.class.getName(), groupId);
    for (Subscription subscription : subscriptions) {
        unsubscribeGroupKBArticles(subscription.getUserId(), groupId);
    }
}
Also used : Group(com.liferay.portal.model.Group) KBArticle(com.liferay.knowledgebase.model.KBArticle) Subscription(com.liferay.portal.model.Subscription)

Aggregations

KBArticle (com.liferay.knowledgebase.model.KBArticle)1 Group (com.liferay.portal.model.Group)1 Subscription (com.liferay.portal.model.Subscription)1