当前位置: 首页>>代码示例>>Java>>正文


Java Group.getName方法代码示例

本文整理汇总了Java中com.liferay.portal.kernel.model.Group.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Group.getName方法的具体用法?Java Group.getName怎么用?Java Group.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.liferay.portal.kernel.model.Group的用法示例。


在下文中一共展示了Group.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSiteGroupDescriptions

import com.liferay.portal.kernel.model.Group; //导入方法依赖的package包/类
public List<String> getSiteGroupDescriptions(List<Long> siteGroupIds)
	throws SystemException {

	List<String> groupDescriptionList = new ArrayList<String>();

	for (Long siteGroupId : siteGroupIds) {
		Group group = GroupLocalServiceUtil.fetchGroup(siteGroupId);
		String groupDescription = group.getName();
		groupDescription = groupDescription.replace(
			"LFR_ORGANIZATION", "(Org)");

		if (group.isCompany()) {
			if (!group.isStagingGroup()) {
				groupDescription = "Global";
			}

			groupDescription += " - " + group.getCompanyId();
		}

		groupDescriptionList.add(groupDescription);
	}

	return groupDescriptionList;
}
 
开发者ID:jorgediaz-lr,项目名称:staging-checker,代码行数:25,代码来源:StagingCheckerPortlet.java

示例2: addSiteMultiSelect

import com.liferay.portal.kernel.model.Group; //导入方法依赖的package包/类
public void addSiteMultiSelect(String name) throws SystemException {
	List<Group> groups =
		GroupLocalServiceUtil.getGroups(
			QueryUtil.ALL_POS, QueryUtil.ALL_POS);

	List<KeyValuePair> values = new ArrayList<KeyValuePair>(groups.size());

	for (Group group : groups) {
		//if ((group.isCommunity() || group.isSite()) &&
		//	!group.isControlPanel() && !group.isStaged()) {
           if (group.isRegularSite() && !group.isControlPanel() && !group.isStaged()) {
			long siteId = group.getGroupId();
			String siteName = group.getName();

			if (Validator.isNull(siteId) || Validator.isNull(siteName)) {
				continue;
			}

			values.add(new KeyValuePair(siteName, String.valueOf(siteId)));
		}
	}

	addMultiSelectList(name, values);
}
 
开发者ID:sorin-pop,项目名称:data-manipulator,代码行数:25,代码来源:DisplayFields.java

示例3: dumpToLog

import com.liferay.portal.kernel.model.Group; //导入方法依赖的package包/类
public static void dumpToLog(
		boolean groupBySite,
		Map<Long, List<Comparison>> comparisonDataMap)
	throws SystemException {

	if (!_log.isInfoEnabled()) {
		return;
	}

	for (
		Entry<Long, List<Comparison>> entry :
			comparisonDataMap.entrySet()) {

		String groupTitle = null;
		Group group = GroupLocalServiceUtil.fetchGroup(entry.getKey());

		if ((group == null) && groupBySite) {
			groupTitle = "N/A";
		}
		else if (group != null) {
			groupTitle = group.getGroupId() + " - " + group.getName();
		}

		if (groupTitle != null) {
			_log.info("");
			_log.info("---------------");
			_log.info("GROUP: " + groupTitle);
			_log.info("---------------");
		}

		for (Comparison comparison : entry.getValue()) {
			comparison.dumpToLog();
		}
	}
}
 
开发者ID:jorgediaz-lr,项目名称:staging-checker,代码行数:36,代码来源:StagingCheckerPortlet.java

示例4: getSiteGroupDescriptions

import com.liferay.portal.kernel.model.Group; //导入方法依赖的package包/类
public List<String> getSiteGroupDescriptions(
		List<Long> siteGroupIds, Locale locale)
	throws SystemException {

	List<String> groupDescriptionList = new ArrayList<String>();

	for (Long siteGroupId : siteGroupIds) {
		Group group = GroupLocalServiceUtil.fetchGroup(siteGroupId);
		String groupDescription = group.getName(locale);
		groupDescription = groupDescription.replace(
			"LFR_ORGANIZATION", "(Org)");

		if (group.isCompany() && !group.isStagingGroup()) {
			groupDescription = GroupConstants.GLOBAL;
			}

		if (GroupConstants.GUEST.equals(groupDescription) ||
			group.isCompany()) {

			groupDescription += " - " + group.getCompanyId();
		}

		groupDescriptionList.add(groupDescription);
	}

	return groupDescriptionList;
}
 
开发者ID:jorgediaz-lr,项目名称:index-checker,代码行数:28,代码来源:IndexCheckerPortlet.java


注:本文中的com.liferay.portal.kernel.model.Group.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。