Example usage for com.liferay.portal.kernel.model OrganizationConstants ANY_PARENT_ORGANIZATION_ID

List of usage examples for com.liferay.portal.kernel.model OrganizationConstants ANY_PARENT_ORGANIZATION_ID

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.model OrganizationConstants ANY_PARENT_ORGANIZATION_ID.

Prototype

int ANY_PARENT_ORGANIZATION_ID

To view the source code for com.liferay.portal.kernel.model OrganizationConstants ANY_PARENT_ORGANIZATION_ID.

Click Source Link

Usage

From source file:com.liferay.site.admin.web.internal.display.context.SiteAdminDisplayContext.java

License:Open Source License

public int getOrganizationsCount(Group group) {
    LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<>();

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

    Company company = themeDisplay.getCompany();

    organizationParams.put("groupOrganization", group.getGroupId());
    organizationParams.put("organizationsGroups", group.getGroupId());

    return OrganizationLocalServiceUtil.searchCount(company.getCompanyId(),
            OrganizationConstants.ANY_PARENT_ORGANIZATION_ID, null, null, null, null, organizationParams);
}

From source file:com.liferay.users.admin.internal.exportimport.data.handler.UsersAdminPortletDataHandler.java

License:Open Source License

@Override
protected PortletPreferences doDeleteData(PortletDataContext portletDataContext, String portletId,
        PortletPreferences portletPreferences) throws Exception {

    List<Organization> organizations = _organizationLocalService.getOrganizations(
            portletDataContext.getCompanyId(), OrganizationConstants.ANY_PARENT_ORGANIZATION_ID);

    for (Organization organization : organizations) {
        _organizationLocalService.deleteOrganization(organization);
    }/*from ww w. j  a  va 2  s.  com*/

    return portletPreferences;
}