本文整理汇总了Java中com.liferay.portal.model.Group.getFriendlyURL方法的典型用法代码示例。如果您正苦于以下问题:Java Group.getFriendlyURL方法的具体用法?Java Group.getFriendlyURL怎么用?Java Group.getFriendlyURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.model.Group
的用法示例。
在下文中一共展示了Group.getFriendlyURL方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMicroSiteURL
import com.liferay.portal.model.Group; //导入方法依赖的package包/类
public static String getMicroSiteURL(PortletRequest request, long groupId)
throws PortalException, SystemException {
String scheme = request.getScheme();
String serverName = request.getServerName();
int serverPort = request.getServerPort();
Group liveGroup = GroupLocalServiceUtil.getGroup(groupId);
int layoutCount = LayoutLocalServiceUtil.getLayoutsCount(liveGroup, false);
if(layoutCount > 0) {
return scheme + HTTP_PREFIX + serverName + StringPool.COLON + serverPort + StringPool.FORWARD_SLASH
+ PUBLIC_PAGE_PREFIX + liveGroup.getFriendlyURL();
}
layoutCount = LayoutLocalServiceUtil.getLayoutsCount(liveGroup, true);
if(layoutCount > 0) {
return scheme + HTTP_PREFIX + serverName + StringPool.COLON + serverPort + StringPool.FORWARD_SLASH
+ PRIVATE_PAGE_PREFIX + liveGroup.getFriendlyURL();
}
return StringPool.POUND;
}
示例2: getPrivateURLOfGroup
import com.liferay.portal.model.Group; //导入方法依赖的package包/类
public static String getPrivateURLOfGroup(Group group,ThemeDisplay themeDisplay)
{
String portalURL = themeDisplay.getPortalURL(); // Ej. "http://localhost" Podr�a ser tambi�n: PortalURL.getPortalURL(request);
String privateGroup = themeDisplay.getPathFriendlyURLPrivateGroup(); // Ej. "/es/group"
// Si fuera la comunidad p�blica usar: getPathFriendlyURLPublic() que ser�a "/es/web"
String groupFriendlyURL = group.getFriendlyURL(); // Ej. "/escuela-de-ingles"
// Ej. http://localhost/es/group/escuela-de-ingles
return portalURL + privateGroup + groupFriendlyURL;
}
示例3: getPublicURLOfGroup
import com.liferay.portal.model.Group; //导入方法依赖的package包/类
public static String getPublicURLOfGroup(Group group,ThemeDisplay themeDisplay)
{
String portalURL = themeDisplay.getPortalURL(); // Ej. "http://localhost" Podr�a ser tambi�n: PortalURL.getPortalURL(request);
String publicGroup = themeDisplay.getPathFriendlyURLPublic(); // Ej. "/es/web"
String groupFriendlyURL = group.getFriendlyURL(); // Ej. "/escuela-de-ingles"
// Ej. http://localhost/es/web/escuela-de-ingles
return portalURL + publicGroup + groupFriendlyURL;
}
示例4: MoveTopicosWizard
import com.liferay.portal.model.Group; //导入方法依赖的package包/类
public MoveTopicosWizard(String id, Group comunidadeOrigem, long idUsuario) {
super(id);
info = new InfoMoverTopico(idUsuario, comunidadeOrigem.getGroupId(), comunidadeOrigem.getName(),comunidadeOrigem.getFriendlyURL());
modelo = new DynamicWizardModel(new ForumOrigemStep()) {
/**
*
*/
private static final long serialVersionUID = 472362717938017089L;
@Override
public void finish() {
try {
MoveTopicoLocalServiceUtil.moveTopico(info);
setResponsePage(new SucessoAoMoverPage());
} catch (PortalException e) {
e.printStackTrace();
setResponsePage(new FalhaAoMoverPage());
} catch (SystemException e) {
e.printStackTrace();
setResponsePage(new FalhaAoMoverPage());
}
super.finish();
}
};
modelo.setLastVisible(false);
init(modelo);
}
示例5: getLink
import com.liferay.portal.model.Group; //导入方法依赖的package包/类
@Override
protected String getLink(UserNotificationEvent userNotificationEvent,
ServiceContext serviceContext) throws Exception {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(userNotificationEvent.getPayload());
String notificationType = jsonObject.getString("notificationType");
ThemeDisplay themeDisplay = serviceContext.getThemeDisplay();
long portletPlid = 0L;
PortletURL portletUrl = null;
switch(notificationType) {
case MicroSiteConstants.REQUEST_STATUS_PENDING:
portletPlid = PortalUtil.getPlidFromPortletId(themeDisplay.getScopeGroupId(), MICROSITES_PORTLET_ID);
if(portletPlid != 0) {
portletUrl = PortletURLFactoryUtil.
create(serviceContext.getLiferayPortletRequest(), MICROSITES_PORTLET_ID, portletPlid, PortletRequest.RENDER_PHASE);
portletUrl.setParameter("redirect", serviceContext.getLayoutFullURL());
portletUrl.setParameter("tabs1","micro-sites-requests");
return portletUrl.toString();
}
return null;
case MicroSiteConstants.REQUEST_STATUS_COMPLETE:
long siteId = jsonObject.getLong("siteId");
Group group = GroupLocalServiceUtil.fetchGroup(siteId);
if(group != null) {
return "/web" + group.getFriendlyURL();
}
return null;
case MicroSiteConstants.REQUEST_STATUS_REJECTED:
portletPlid = PortalUtil.getPlidFromPortletId(themeDisplay.getScopeGroupId(), MY_SITES_PORTLET_ID);
if(portletPlid != 0) {
portletUrl = PortletURLFactoryUtil.
create(serviceContext.getLiferayPortletRequest(), MY_SITES_PORTLET_ID, portletPlid, PortletRequest.RENDER_PHASE);
portletUrl.setParameter("redirect", serviceContext.getLayoutFullURL());
portletUrl.setParameter("tabs1","micro-sites-requests");
return portletUrl.toString();
}
return null;
default:
return null;
}
}