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


Java PortalUtil.getPlidFromPortletId方法代码示例

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


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

示例1: getURLCalifications

import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public static final PortletURL getURLCalifications(LiferayPortletRequest liferayPortletRequest,
		LiferayPortletResponse liferayPortletResponse, LearningActivity activity) throws Exception {
	
	long plid = PortalUtil.getPlidFromPortletId(activity.getGroupId(), ACTIVITY_VIEWER_PORTLET_ID);
     
	log.debug("PLID: "+plid);
	
	if (plid == LayoutConstants.DEFAULT_PLID) {
		throw new NoSuchLayoutException();
	}		

	PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(plid, LMS_EDITACTIVITY_PORTLET_ID, PortletRequest.RENDER_PHASE);
	portletURL.setWindowState(WindowState.NORMAL);
	
	portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
	portletURL.setParameter("actionEditingActivity", StringPool.FALSE);
	portletURL.setParameter("actionEditingModule", StringPool.FALSE);
	portletURL.setParameter("actionCalifications", StringPool.TRUE);
	portletURL.setParameter("actId",Long.toString( activity.getActId()));
	
	long userId = PrincipalThreadLocal.getUserId();
	
	if(Validator.isNotNull(userId)) {			
		//portletURL.setParameter("mvcPath", "/html/editactivity/editactivity.jsp");
		portletURL.setParameter("califications", StringPool.TRUE);
		portletURL.setParameter("editing", StringPool.FALSE);
		portletURL.setParameter("resId",Long.toString( activity.getActId()));
		portletURL.setParameter("resModuleId",Long.toString( activity.getModuleId())); 
	}
	
	portletURL.setParameter("p_o_p_id",ACTIVITY_VIEWER_PORTLET_ID);
	
	//log.debug(" getURLCalifications: "+portletURL);
	
	return portletURL;		
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:37,代码来源:LmsActivitiesList.java

示例2: getURLEditActivity

import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public static final PortletURL getURLEditActivity(LiferayPortletRequest liferayPortletRequest,
		LiferayPortletResponse liferayPortletResponse, LearningActivity activity) throws Exception {
	PortletURL portletURL = null;
	if(activity!=null){
		long plid = PortalUtil.getPlidFromPortletId(activity.getGroupId(), ACTIVITY_VIEWER_PORTLET_ID);
	     
		
		log.debug("PLID: "+plid);
		
		if (plid == LayoutConstants.DEFAULT_PLID) {
			throw new NoSuchLayoutException();
		}		

		portletURL = liferayPortletResponse.createLiferayPortletURL(plid, LMS_EDITACTIVITY_PORTLET_ID, PortletRequest.RENDER_PHASE);
		portletURL.setWindowState(WindowState.NORMAL);
		portletURL.setParameter("actId",Long.toString( activity.getActId()));
		portletURL.setParameter("moduleId",Long.toString( activity.getModuleId()));
		portletURL.setParameter("actionEditingActivity", StringPool.TRUE);
		portletURL.setParameter("actionCalifications", StringPool.FALSE);
		portletURL.setParameter("actionEditingModule", StringPool.FALSE);
		portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
		
		
		long userId = PrincipalThreadLocal.getUserId();
		
		if(Validator.isNotNull(userId)) {			
			portletURL.setParameter("mvcPath", "/html/editactivity/editactivity.jsp");
			portletURL.setParameter("editing", StringPool.TRUE);
			portletURL.setParameter("resId",Long.toString( activity.getActId()));
			portletURL.setParameter("resModuleId",Long.toString( activity.getModuleId())); 
		}
		
		portletURL.setParameter("p_o_p_id",ACTIVITY_VIEWER_PORTLET_ID);
		
		//log.debug(" getURLEditActivity: "+portletURL);
				
	}
	return portletURL;
	
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:41,代码来源:LmsActivitiesList.java

示例3: getURLCreateActivity

import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public static final PortletURL getURLCreateActivity(LiferayPortletRequest liferayPortletRequest,
		LiferayPortletResponse liferayPortletResponse, Module module) throws Exception {
	PortletURL portletURL = null;
	if(module!=null){
		long plid = PortalUtil.getPlidFromPortletId(module.getGroupId(), ACTIVITY_VIEWER_PORTLET_ID);
	     
		log.debug("PLID: "+plid);
		
		if (plid == LayoutConstants.DEFAULT_PLID) {
			throw new NoSuchLayoutException();
		}		

		portletURL = liferayPortletResponse.createLiferayPortletURL(plid, LMS_EDITACTIVITY_PORTLET_ID, PortletRequest.RENDER_PHASE);
		portletURL.setWindowState(WindowState.NORMAL);
		portletURL.setParameter("actionEditingActivity", StringPool.TRUE);
		portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
		portletURL.setParameter("mvcPath", "/html/lmsactivitieslist/newactivity.jsp");
		portletURL.setParameter("resModuleId",Long.toString(module.getModuleId())); 	
		portletURL.setParameter("actId",Long.toString(0)); 
		portletURL.setParameter("resId",Long.toString(0)); 
		portletURL.setParameter("p_o_p_id",ACTIVITY_VIEWER_PORTLET_ID);
		
		log.debug(" getURLCreateActivity: "+portletURL);
		
	}
	
	return portletURL;		
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:29,代码来源:LmsActivitiesList.java

示例4: getURLEditModule

import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public static final PortletURL getURLEditModule(LiferayPortletRequest liferayPortletRequest,
		LiferayPortletResponse liferayPortletResponse, Module module) throws Exception {
	
	PortletURL portletURL = null;
	if(module!=null){
		long plid = PortalUtil.getPlidFromPortletId(module.getGroupId(), ACTIVITY_VIEWER_PORTLET_ID);
	     
		log.debug("PLID: "+plid);
		
		if (plid == LayoutConstants.DEFAULT_PLID) {
			throw new NoSuchLayoutException();
		}

		portletURL = liferayPortletResponse.createLiferayPortletURL(plid, LMS_EDITMODULE_PORTLET_ID, PortletRequest.RENDER_PHASE);
		portletURL.setWindowState(WindowState.NORMAL);
		portletURL.setParameter("actionEditingModule", StringPool.TRUE);
		portletURL.setParameter("actionEditingActivity", StringPool.FALSE);
		portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
		portletURL.setParameter("actionCalifications", StringPool.FALSE);
		portletURL.setParameter("view", "editmodule");
		portletURL.setParameter("moduleId",Long.toString(module.getModuleId()));
		portletURL.setParameter("actId","");
		portletURL.setParameter("resourcePrimKey",Long.toString(module.getModuleId()));		
		portletURL.setParameter("editType","edit");		
		portletURL.setParameter("p_o_p_id",ACTIVITY_VIEWER_PORTLET_ID);
		
		//log.debug(" getURLEditModule: "+portletURL);
	}
	
	
	return portletURL;		
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:33,代码来源:LmsActivitiesList.java


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