/** * @inheritDoc */ public Tool getTool() { // we might have a case where a placement was made before a tool was registered, leaving us with a toolId but no tool. if ((m_tool == null) && (m_toolId != null)) { // if so, we can try again m_tool = getToolManager().getTool(m_toolId); } return m_tool; }
public void setTitle(String title) { // This is needed so that on save we don't lose the title attribute. m_custom_title = title != null; super.setTitle(title); }
public void doHelp(HttpServletRequest req, HttpServletResponse res, Session session, String toolContextPath, String toolPathInfo) throws ToolException, IOException { // permission check - none // get the detault skin String skin = ServerConfigurationService.getString("skin.default"); // find the tool registered for this ActiveTool tool = ActiveToolManager.getActiveTool("sakai.help"); if (tool == null) { portal.doError(req, res, session, Portal.ERROR_WORKSITE); return; } // form a placement based on ... help TODO: is this enough? // Note: the placement is transient, but will always have the same id // and (null) context org.sakaiproject.util.Placement placement = new org.sakaiproject.util.Placement( "help", tool.getId(), tool, null, null, null); portal .forwardTool(tool, req, res, placement, skin, toolContextPath, toolPathInfo); }
/** * {@inheritDoc} */ public void setTool(String toolId, Tool tool) { super.setTool(toolId, tool); setPageCategory(); }
/** * {@inheritDoc} */ public Properties getConfig() { // the placement config overrides registered config Properties p = new Properties(); // put the mutable registered ones in, and do it first so that the placement can override if (m_tool != null) { p.putAll(m_tool.getMutableConfig()); } // put the placement properties in p.putAll(getPlacementConfig()); // put the final registered ones in last so they cannot be overriden by the placement if (m_tool != null) { p.putAll(m_tool.getFinalConfig()); } return p; }
Placement placement = new org.sakaiproject.util.Placement("portal-temporary", /* toolId */
Placement placement = new org.sakaiproject.util.Placement("portal-temporary", /* toolId */
/** * {@inheritDoc} */ public int hashCode() { return getId().hashCode(); }
public void doHelp(HttpServletRequest req, HttpServletResponse res, Session session, String toolContextPath, String toolPathInfo) throws ToolException, IOException { // permission check - none // get the detault skin String skin = ServerConfigurationService.getString("skin.default"); // find the tool registered for this ActiveTool tool = ActiveToolManager.getActiveTool("sakai.help"); if (tool == null) { portal.doError(req, res, session, Portal.ERROR_WORKSITE); return; } // form a placement based on ... help TODO: is this enough? // Note: the placement is transient, but will always have the same id // and (null) context org.sakaiproject.util.Placement placement = new org.sakaiproject.util.Placement( "help", tool.getId(), tool, null, null, null); portal .forwardTool(tool, req, res, placement, skin, toolContextPath, toolPathInfo); }
Placement placement = new org.sakaiproject.util.Placement(siteId + "-presence", tool.getId(), tool, null, siteId, null);
Placement placement = new org.sakaiproject.util.Placement(siteId + PresenceService.PRESENCE_SUFFIX, tool.getId(), tool, null, siteId, null);