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