use of com.liferay.portlet.expando.model.ExpandoBridge in project liferay-ide by liferay.
the class OAuthTokenModelImpl method setExpandoBridgeAttributes.
@Override
public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
ExpandoBridge expandoBridge = getExpandoBridge();
expandoBridge.setAttributes(serviceContext);
}
use of com.liferay.portlet.expando.model.ExpandoBridge in project liferay-ide by liferay.
the class KBTemplateModelImpl method setExpandoBridgeAttributes.
@Override
public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
ExpandoBridge expandoBridge = getExpandoBridge();
expandoBridge.setAttributes(serviceContext);
}
use of com.liferay.portlet.expando.model.ExpandoBridge in project liferay-ide by liferay.
the class KBArticleModelImpl method setExpandoBridgeAttributes.
@Override
public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
ExpandoBridge expandoBridge = getExpandoBridge();
expandoBridge.setAttributes(serviceContext);
}
use of com.liferay.portlet.expando.model.ExpandoBridge in project liferay-ide by liferay.
the class KBFolderModelImpl method setExpandoBridgeAttributes.
@Override
public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
ExpandoBridge expandoBridge = getExpandoBridge();
expandoBridge.setAttributes(serviceContext);
}
use of com.liferay.portlet.expando.model.ExpandoBridge in project sw360portal by sw360.
the class CustomFieldHelper method ensureUserCustomFieldExists.
private static void ensureUserCustomFieldExists(com.liferay.portal.model.User liferayUser, String customFieldName, int customFieldType) throws PortalException, SystemException {
ExpandoBridge exp = liferayUser.getExpandoBridge();
if (!exp.hasAttribute(customFieldName)) {
exp.addAttribute(customFieldName, customFieldType, false);
long companyId = liferayUser.getCompanyId();
ExpandoColumn column = ExpandoColumnLocalServiceUtil.getColumn(companyId, exp.getClassName(), ExpandoTableConstants.DEFAULT_TABLE_NAME, customFieldName);
String[] roleNames = new String[] { RoleConstants.USER, RoleConstants.POWER_USER };
for (String roleName : roleNames) {
Role role = RoleLocalServiceUtil.getRole(companyId, roleName);
if (role != null && column != null) {
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(column.getColumnId()), role.getRoleId(), new String[] { ActionKeys.VIEW, ActionKeys.UPDATE });
}
}
}
}
Aggregations