當前位置: 首頁>>代碼示例>>Java>>正文


Java Placement.getPlacementConfig方法代碼示例

本文整理匯總了Java中org.sakaiproject.tool.api.Placement.getPlacementConfig方法的典型用法代碼示例。如果您正苦於以下問題:Java Placement.getPlacementConfig方法的具體用法?Java Placement.getPlacementConfig怎麽用?Java Placement.getPlacementConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.sakaiproject.tool.api.Placement的用法示例。


在下文中一共展示了Placement.getPlacementConfig方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: doGet

import org.sakaiproject.tool.api.Placement; //導入方法依賴的package包/類
/**
 * Respond to a request by dispatching to a portlet like "do" method based on the portlet mode and tool mode
 */
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException
{
	// set in VmServlet
	ParameterParser params = (ParameterParser) req.getAttribute(ATTR_PARAMS);

	// we will need some covers... Note: parameters are parsed (i.e. files are read) here
	Context context = new Context(this, req);
	Placement placement = ToolManager.getCurrentPlacement();
	PortletConfig config = new PortletConfig(getServletConfig(), placement.getPlacementConfig(), placement.getTool()
			.getRegisteredConfig(), placement);
	VelocityPortlet portlet = new VelocityPortlet(getPid(req), config);
	JetspeedRunData rundata = new JetspeedRunData(req, getState(req), getPid(req), params);

	req.setAttribute(ATTR_CONTEXT, context);
	req.setAttribute(ATTR_CONFIG, config);
	req.setAttribute(ATTR_PORTLET, portlet);
	req.setAttribute(ATTR_RUNDATA, rundata);

	super.doGet(req, res);
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:24,代碼來源:VelocityPortletPaneledAction.java

示例2: getAllProperties

import org.sakaiproject.tool.api.Placement; //導入方法依賴的package包/類
private Properties getAllProperties(Placement placement)
{
    Properties config = placement.getTool().getRegisteredConfig();
    Properties mconfig = placement.getPlacementConfig();
    for ( Object okey : mconfig.keySet() ) {
        String key = (String) okey;
        config.setProperty(key,mconfig.getProperty(key));
    }
    return config;
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:11,代碼來源:PortletIFrame.java

示例3: getPortletDD

import org.sakaiproject.tool.api.Placement; //導入方法依賴的package包/類
public PortletDD getPortletDD(Placement placement)
{
	Properties toolProperties = placement.getPlacementConfig();
	String portletName = null;
	String appName = null;
	String fred = null;

	if (toolProperties != null)
	{
		log.debug("tp = {}", toolProperties);
		portletName = toolProperties.getProperty(PortalService.TOOL_PORTLET_NAME);
		appName = toolProperties.getProperty(PortalService.TOOL_PORTLET_APP_NAME);
		fred = toolProperties.getProperty("FRED");
	}
	log.debug("appName={}", appName);
	log.debug("portletName={}", portletName);
	log.debug("fred={}", fred);
	Properties configProperties = placement.getConfig();
	if (configProperties != null)
	{
		if (portletName == null)
		{
			portletName = configProperties
					.getProperty(PortalService.TOOL_PORTLET_NAME);
		}
		if (appName == null)
		{
			appName = configProperties
					.getProperty(PortalService.TOOL_PORTLET_APP_NAME);
		}
	}
	log.debug("appName={}", appName);
	log.debug("portletName={}", portletName);
	PortletDD pdd = PortletContextManager.getManager().getPortletDescriptor(appName,
			portletName);
	log.debug("pdd={}", pdd);
	return pdd;
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:39,代碼來源:PortletToolRenderService.java

示例4: SakaiPortletConfig

import org.sakaiproject.tool.api.Placement; //導入方法依賴的package包/類
public SakaiPortletConfig(Placement placement)
{
	if (placement == null)
	{
		return;
	}

	Properties toolProperties = placement.getPlacementConfig();
	if (toolProperties != null)
	{
		contextPath = toolProperties
				.getProperty(PortalService.TOOL_PORTLET_CONTEXT_PATH);
		portletName = toolProperties.getProperty(PortalService.TOOL_PORTLET_NAME);
	}
	Properties configProperties = placement.getConfig();
	if (configProperties != null)
	{
		if (isEmpty(contextPath))
		{
			contextPath = configProperties
					.getProperty(PortalService.TOOL_PORTLET_CONTEXT_PATH);
		}
		if (isEmpty(portletName))
		{
			portletName = configProperties
					.getProperty(PortalService.TOOL_PORTLET_NAME);
		}
	}
	portlet = !(isEmpty(contextPath) || isEmpty(portletName));

}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:32,代碼來源:PortletRegistry.java

示例5: extractPropertiesFromTool

import org.sakaiproject.tool.api.Placement; //導入方法依賴的package包/類
protected Properties extractPropertiesFromTool() {
	Placement placement = toolManager.getCurrentPlacement();
	Properties props = placement.getPlacementConfig();
	if(props.isEmpty())
		props = placement.getConfig();
	return props;
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:8,代碼來源:SearchBeanImpl.java

示例6: getDropboxNotificationsProperty

import org.sakaiproject.tool.api.Placement; //導入方法依賴的package包/類
/**
 * @return
 */
protected String getDropboxNotificationsProperty()
{
	Placement placement = ToolManager.getCurrentPlacement();
	Properties props = placement.getPlacementConfig();
	String dropboxNotifications = props.getProperty(ResourcesAction.DROPBOX_NOTIFICATIONS_PROPERTY);
	if(dropboxNotifications == null)
	{
		dropboxNotifications = ResourcesAction.DROPBOX_NOTIFICATIONS_DEFAULT_VALUE;
	}
	
	log.debug("{}.getDropboxNotificationsProperty() dropboxNotifications == {}", this, dropboxNotifications);

	return dropboxNotifications;
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:18,代碼來源:ResourcesHelperAction.java

示例7: getDropboxNotificationsProperty

import org.sakaiproject.tool.api.Placement; //導入方法依賴的package包/類
protected String getDropboxNotificationsProperty()
{
	Placement placement = toolManager.getCurrentPlacement();
	Properties props = placement.getPlacementConfig();
	String dropboxNotifications = props.getProperty(DROPBOX_NOTIFICATIONS_PROPERTY);
	if(dropboxNotifications == null)
	{
		dropboxNotifications = DROPBOX_NOTIFICATIONS_DEFAULT_VALUE;
	}

	log.debug("{}.getDropboxNotificationsProperty() dropboxNotifications == {}", this, dropboxNotifications);

	return dropboxNotifications;
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:15,代碼來源:ResourcesAction.java

示例8: doUpdateDropboxOptions

import org.sakaiproject.tool.api.Placement; //導入方法依賴的package包/類
/**
* Read user inputs from options form and update accordingly
*/
public void doUpdateDropboxOptions(RunData data)
{
	if (!"POST".equals(data.getRequest().getMethod())) {
		return;
	}
	
	// get the state object
	SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());

	//get the ParameterParser from RunData
	ParameterParser params = data.getParameters ();

	String dropboxNotifications = params.getString(DROPBOX_NOTIFICATIONS_PARAMETER_NAME);
	if(dropboxNotifications == null)
	{
		dropboxNotifications = DROPBOX_NOTIFICATIONS_DEFAULT_VALUE;
	}

	Placement placement = toolManager.getCurrentPlacement();
	Properties props = placement.getPlacementConfig();
	props.setProperty(DROPBOX_NOTIFICATIONS_PROPERTY, dropboxNotifications);
	placement.save();
	
	state.setAttribute(STATE_MODE, MODE_LIST);

}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:30,代碼來源:ResourcesAction.java


注:本文中的org.sakaiproject.tool.api.Placement.getPlacementConfig方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。