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


Java PortletConfig.getPortletContext方法代码示例

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


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

示例1: getUpdateMessageOffline

import javax.portlet.PortletConfig; //导入方法依赖的package包/类
public String getUpdateMessageOffline(PortletConfig portletConfig) {
	LiferayPortletContext context =
		(LiferayPortletContext)portletConfig.getPortletContext();

	long installationTimestamp = context.getPortlet().getTimestamp();

	if (installationTimestamp == 0L) {
		return null;
	}

	long offlineUpdateTimeoutMilis =
		(Long)ConfigurationUtil.getConfigurationEntry(
			"offlineUpdateTimeoutMilis");

	long offlineUpdateTimestamp =
		(installationTimestamp + offlineUpdateTimeoutMilis);

	long currentTimeMillis = System.currentTimeMillis();

	if (offlineUpdateTimestamp > currentTimeMillis) {
		return null;
	}

	return (String)ConfigurationUtil.getConfigurationEntry(
			"offlineUpdateMessage");
}
 
开发者ID:jorgediaz-lr,项目名称:staging-checker,代码行数:27,代码来源:StagingCheckerPortlet.java

示例2: PortletContextAwareProcessor

import javax.portlet.PortletConfig; //导入方法依赖的package包/类
/**
 * Create a new PortletContextAwareProcessor for the given context and config.
 */
public PortletContextAwareProcessor(PortletContext portletContext, PortletConfig portletConfig) {
	this.portletContext = portletContext;
	this.portletConfig = portletConfig;
	if (portletContext == null && portletConfig != null) {
		this.portletContext = portletConfig.getPortletContext();
	}
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:11,代码来源:PortletContextAwareProcessor.java

示例3: setPortletConfig

import javax.portlet.PortletConfig; //导入方法依赖的package包/类
@Override
public void setPortletConfig(PortletConfig portletConfig) {
	this.portletConfig = portletConfig;
	if (portletConfig != null && this.portletContext == null) {
		this.portletContext = portletConfig.getPortletContext();
	}
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:8,代码来源:StaticPortletApplicationContext.java

示例4: getPluginPackage

import javax.portlet.PortletConfig; //导入方法依赖的package包/类
public static PluginPackage getPluginPackage(PortletConfig portletConfig) {
	if (portletConfig == null) {
		return null;
	}

	PortletContext portletContext = portletConfig.getPortletContext();

	String portletContextName = portletContext.getPortletContextName();

	return DeployManagerUtil.getInstalledPluginPackage(portletContextName);
}
 
开发者ID:jorgediaz-lr,项目名称:index-checker,代码行数:12,代码来源:IndexCheckerPortlet.java

示例5: init

import javax.portlet.PortletConfig; //导入方法依赖的package包/类
public void init(PortletConfig config) throws PortletException {
	super.init(config);

	pContext = config.getPortletContext();
	try {
		vengine = vHelper.makeEngine(pContext);
	}
	catch(Exception e)
	{
		throw new PortletException("Cannot initialize Velocity ", e);
	}
	log.info("iFrame Portlet vengine={} rb={}", vengine, rb);

}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:15,代码来源:SakaiIFrame.java

示例6: init

import javax.portlet.PortletConfig; //导入方法依赖的package包/类
public void init(PortletConfig config) throws PortletException {
	super.init(config);

	pContext = config.getPortletContext();

	// Populate the list of fields
	fieldList.add("launch");
	fieldList.add("secret");
	fieldList.add("key");
	fieldList.add("xml");
	fieldList.add("frameheight");
	fieldList.add("toolorder");
	fieldList.add("debug");
	fieldList.add("pagetitle");
	fieldList.add("tooltitle");
	fieldList.add("custom");
	fieldList.add("releasename");
	fieldList.add("releaseemail");
	fieldList.add("assignment");
	fieldList.add("newpage");
	// fieldList.add("maximize");
	fieldList.add("allowsettings");
	fieldList.add("allowroster");
	fieldList.add("contentlink");
	fieldList.add("splash");
	fieldList.add("fa_icon");
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:28,代码来源:IMSBLTIPortlet.java

示例7: setPortletConfig

import javax.portlet.PortletConfig; //导入方法依赖的package包/类
public void setPortletConfig(PortletConfig portletConfig) {
	this.portletConfig = portletConfig;
	if (portletConfig != null && this.portletContext == null) {
		this.portletContext = portletConfig.getPortletContext();
	}
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:7,代码来源:StaticPortletApplicationContext.java

示例8: getPluginPackage

import javax.portlet.PortletConfig; //导入方法依赖的package包/类
public static PluginPackage getPluginPackage(PortletConfig portletConfig) {
	PortletContext portletContext = portletConfig.getPortletContext();

	String portletContextName = portletContext.getPortletContextName();

	return DeployManagerUtil.getInstalledPluginPackage(portletContextName);
}
 
开发者ID:jorgediaz-lr,项目名称:staging-checker,代码行数:8,代码来源:StagingCheckerPortlet.java


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