Example usage for com.liferay.portal.liveusers LiveUsers deleteGroup

List of usage examples for com.liferay.portal.liveusers LiveUsers deleteGroup

Introduction

In this page you can find the example usage for com.liferay.portal.liveusers LiveUsers deleteGroup.

Prototype

public static void deleteGroup(long companyId, long groupId) 

Source Link

Usage

From source file:com.liferay.portlet.sites.action.EditGroupAction.java

License:Open Source License

protected void deleteGroup(ActionRequest actionRequest) throws Exception {
    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    long groupId = ParamUtil.getLong(actionRequest, "groupId");

    GroupServiceUtil.deleteGroup(groupId);

    LiveUsers.deleteGroup(themeDisplay.getCompanyId(), groupId);
}

From source file:com.liferay.site.admin.web.internal.portlet.SiteAdminPortlet.java

License:Open Source License

public void deleteGroups(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {

    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    long[] deleteGroupIds = null;

    long groupId = ParamUtil.getLong(actionRequest, "groupId");

    if (groupId > 0) {
        deleteGroupIds = new long[] { groupId };
    } else {//from   w ww. j  a v  a2  s.com
        deleteGroupIds = ParamUtil.getLongValues(actionRequest, "rowIds");
    }

    for (long deleteGroupId : deleteGroupIds) {
        groupService.deleteGroup(deleteGroupId);

        LiveUsers.deleteGroup(themeDisplay.getCompanyId(), deleteGroupId);
    }
}