本文整理汇总了Java中org.sakaiproject.site.api.ToolConfiguration.getLayoutHints方法的典型用法代码示例。如果您正苦于以下问题:Java ToolConfiguration.getLayoutHints方法的具体用法?Java ToolConfiguration.getLayoutHints怎么用?Java ToolConfiguration.getLayoutHints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sakaiproject.site.api.ToolConfiguration
的用法示例。
在下文中一共展示了ToolConfiguration.getLayoutHints方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveToolConfigTx
import org.sakaiproject.site.api.ToolConfiguration; //导入方法依赖的package包/类
/**
* The transactino code for saving a tool config.
*/
protected void saveToolConfigTx(ToolConfiguration tool)
{
// delete this tool and tool properties
Object fields[] = new Object[2];
fields[0] = caseId(tool.getSiteId());
fields[1] = caseId(tool.getId());
String statement = siteServiceSql.getDeleteToolPropertySql();
m_sql.dbWrite(statement, fields);
statement = siteServiceSql.getDeleteToolSql();
m_sql.dbWrite(statement, fields);
// write the tool
statement = siteServiceSql.getInsertToolSql();
fields = new Object[7];
fields[0] = tool.getId();
fields[1] = tool.getPageId();
fields[2] = caseId(tool.getSiteId());
fields[3] = tool.getToolId();
fields[4] = Integer.valueOf(tool.getPageOrder());
fields[5] = tool.getTitle();
fields[6] = tool.getLayoutHints();
m_sql.dbWrite(statement, fields);
// write the tool's properties
writeProperties("SAKAI_SITE_TOOL_PROPERTY", "TOOL_ID", tool.getId(), "SITE_ID", caseId(tool.getSiteId()), tool.getPlacementConfig());
}
示例2: BaseToolConfiguration
import org.sakaiproject.site.api.ToolConfiguration; //导入方法依赖的package包/类
/**
* Construct as a copy of another.
*
* @param other
* The other to copy.
* @param page
* The page in which this tool lives.
* @param exact
* If true, we copy ids - else we generate a new one.
*/
protected BaseToolConfiguration(BaseSiteService siteService, ToolConfiguration other, SitePage page, boolean exact)
{
this.siteService = siteService;
m_page = page;
BaseToolConfiguration bOther = (BaseToolConfiguration) other;
if (exact)
{
m_id = other.getId();
}
else
{
m_id = siteService.idManager().createUuid();
}
m_toolId = other.getToolId();
m_tool = other.getTool();
m_title = other.getTitle();
m_layoutHints = other.getLayoutHints();
m_pageId = bOther.m_pageId;
m_pageOrder = bOther.m_pageOrder;
m_custom_title = getTitleCustom(page);
m_siteId = getContainingPage().getContainingSite().getId();
m_skin = bOther.m_skin;
Hashtable h = other.getPlacementConfig();
// exact copying of ToolConfiguration items vs replacing occurence of
// site id within item value, depending on "exact" setting -zqian
if (exact)
{
m_config.putAll(other.getPlacementConfig());
}
else
{
for (Enumeration e = h.keys(); e.hasMoreElements();)
{
// replace site id string inside configuration
String pOtherConfig = (String) e.nextElement();
String pOtherConfigValue = (String) h.get(pOtherConfig);
m_config.put(pOtherConfig, pOtherConfigValue.replaceAll(bOther
.getSiteId(), m_siteId));
}
}
m_configLazy = bOther.m_configLazy;
setPageCategory();
}