Search in sources :

Example 6 with CustomFieldSetting

use of com.ableneo.liferay.portal.setup.domain.CustomFieldSetting in project liferay-db-setup-core by ableneo.

the class SetupUserGroups method setCustomFields.

private static void setCustomFields(final com.liferay.portal.kernel.model.UserGroup liferayUserGroup, final List<CustomFieldSetting> customFieldSettings, final UserGroup userGroup) {
    if (liferayUserGroup == null) {
        return;
    }
    Class clazz = com.liferay.portal.kernel.model.UserGroup.class;
    for (CustomFieldSetting cfs : customFieldSettings) {
        String resolverHint = "Custom value for userGroup " + userGroup.getName() + ", " + " Key " + cfs.getKey() + ", value " + cfs.getValue();
        long company = SetupConfigurationThreadLocal.getRunInCompanyId();
        CustomFieldSettingUtil.setExpandoValue(resolverHint, liferayUserGroup.getUserGroupId(), company, clazz, liferayUserGroup.getUserGroupId(), cfs.getKey(), cfs.getValue());
    }
}
Also used : CustomFieldSetting(com.ableneo.liferay.portal.setup.domain.CustomFieldSetting) UserGroup(com.ableneo.liferay.portal.setup.domain.UserGroup)

Aggregations

CustomFieldSetting (com.ableneo.liferay.portal.setup.domain.CustomFieldSetting)6 UserGroup (com.ableneo.liferay.portal.setup.domain.UserGroup)1 PortalException (com.liferay.portal.kernel.exception.PortalException)1 Group (com.liferay.portal.kernel.model.Group)1 Layout (com.liferay.portal.kernel.model.Layout)1 Organization (com.liferay.portal.kernel.model.Organization)1 UserGroup (com.liferay.portal.kernel.model.UserGroup)1 SiteNavigationMenuItem (com.liferay.site.navigation.model.SiteNavigationMenuItem)1