本文整理汇总了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;
}
示例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);
}
示例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();
}
}
}
示例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;
}