private boolean isFragmentTool(ToolConfiguration configuration) { Properties placementProperties = configuration.getConfig(); String fragmentCapable = placementProperties .getProperty(TOOL_FRAGMENT_PRODUCER_ID); if (fragmentCapable == null || fragmentCapable.length() == 0) { return false; } return true; }
/** * Captures the rules for the various tools and when they want a popup * * @param <code>pageTool</code> * The tools configuration object. * @return The url to be uded in the popup of null of there is no * tool-requested popup. */ public static String getToolPopupUrl(ToolConfiguration pageTool) { Properties pro = pageTool.getConfig(); String source = null; if ( "sakai.web.168".equals(pageTool.getToolId()) && "true".equals(pro.getProperty("popup")) ) { source = pro.getProperty("source"); } else if ( "sakai.iframe".equals(pageTool.getToolId()) && "true".equals(pro.getProperty("popup")) ) { source = pro.getProperty("source"); } else if ( "sakai.basiclti".equals(pageTool.getToolId()) && "on".equals(pro.getProperty("imsti.newpage")) ) { source = "/access/basiclti/site/"+pageTool.getContext()+"/"+pageTool.getId(); } return source; }
/** * @inheritDoc */ @Override public String channelReference(String context, String id) { /* SAK-19516: for MOTD and Admin Workspace Announcements, the channel reference * is not calculated based on the context and id, but pulled from SAKAI_TOOL_PROPERTY 'channel'. */ String channelRef = null; try { ToolConfiguration tool = m_siteService.getSite(context).getToolForCommonId(SAKAI_ANNOUNCEMENT_TOOL_ID); if (tool != null) { channelRef = tool.getConfig().getProperty(ANNOUNCEMENT_CHANNEL_PROPERTY, null); } } catch (IdUnusedException e) { // ignore the error, continue with the default method M_log.debug("Could not find channelRef in channel property, falling back to default method..."); } if (channelRef == null || channelRef.trim().length() == 0) { channelRef = super.channelReference(context, id); } return channelRef; } // channelReference
String toolPermissionsStr = config.getConfig().getProperty(TOOLCONFIG_REQUIRED_PERMISSIONS); if (log.isDebugEnabled()) { log.debug("tool: " + config.getToolId() + ", permissions: " + toolPermissionsStr);
try { placement = SiteService.findTool(placement_id); config = placement.getConfig(); siteId = placement.getSiteId(); } catch (Exception e) {
try { placement = SiteService.findTool(placement_id); config = placement.getConfig(); siteId = placement.getSiteId(); } catch (Exception e) {
basicLTIArchiveBean.setPageTitle(sitePage.getTitle()); basicLTIArchiveBean.setToolTitle(toolConfiguration.getTitle()); basicLTIArchiveBean.setSiteToolProperties(toolConfiguration.getConfig());
boolean renderInline = BooleanUtils.toBoolean(placement.getConfig().getProperty("renderInline"));
boolean renderInline = BooleanUtils.toBoolean(placement.getConfig().getProperty("renderInline"));
boolean showResetButton = !"false".equals(placement.getConfig().getProperty( Portal.TOOLCONFIG_SHOW_RESET_BUTTON)); boolean helpEnabledInTool = !"false".equals(placement.getConfig().getProperty( Portal.TOOLCONFIG_SHOW_HELP_BUTTON)); boolean showHelpButton = helpEnabledGlobally && helpEnabledInTool; if (showHelpButton) String helpDocUrl = placement.getConfig().getProperty( Portal.TOOLCONFIG_HELP_DOCUMENT_URL); String helpDocId = placement.getConfig().getProperty( Portal.TOOLCONFIG_HELP_DOCUMENT_ID); if (helpDocUrl != null && helpDocUrl.length() > 0) boolean suppressTitle = BooleanUtils.toBoolean(placement.getConfig().getProperty("suppressTitle")); toolMap.put("suppressTitle", suppressTitle); String doPreFetch = placement.getConfig().getProperty(Portal.JSR_168_PRE_RENDER); if ( ! "false".equals(doPreFetch) ) boolean showDirectToolUrl = !"false".equals(placement.getConfig().getProperty(Portal.TOOL_DIRECTURL_ENABLED_PROP)); toolMap.put("showDirectToolUrl", showDirectToolUrl);
public static boolean sakaiInfo(Properties props, String context, String placementId, ResourceLoader rb) { Site site; try { site = SiteService.getSite(context); } catch (IdUnusedException e) { log.error("No site/page associated with Launch context={}", context); return false; } // Add the generic information addGlobalData(site, props, null, rb); ToolConfiguration placement = SiteService.findTool(placementId); Properties config = placement.getConfig(); String roleMapProp = toNull(getCorrectProperty(config, "rolemap", placement)); addRoleInfo(props, null, context, roleMapProp); addSiteInfo(props, null, site); // Add Placement Information addPlacementInfo(props, placementId); return true; }
public static boolean sakaiInfo(Properties props, String context, String placementId, ResourceLoader rb) { Site site = null; try { site = SiteService.getSite(context); } catch (Exception e) { log.error("No site/page associated with Launch context={}", context); return false; } // Add the generic information addGlobalData(site, props, null, rb); ToolConfiguration placement = SiteService.findTool(placementId); Properties config = placement.getConfig(); String roleMapProp = toNull(getCorrectProperty(config, "rolemap", placement)); addRoleInfo(props, null, context, roleMapProp); addSiteInfo(props, null, site); // Add Placement Information addPlacementInfo(props, placementId); return true; }
boolean showResetButton = !"false".equals(placement.getConfig().getProperty( Portal.TOOLCONFIG_SHOW_RESET_BUTTON)); boolean helpEnabledInTool = !"false".equals(placement.getConfig().getProperty( Portal.TOOLCONFIG_SHOW_HELP_BUTTON)); boolean showHelpButton = helpEnabledGlobally && helpEnabledInTool; if (showHelpButton) String helpDocUrl = placement.getConfig().getProperty( Portal.TOOLCONFIG_HELP_DOCUMENT_URL); String helpDocId = placement.getConfig().getProperty( Portal.TOOLCONFIG_HELP_DOCUMENT_ID); if (helpDocUrl != null && helpDocUrl.length() > 0) boolean suppressTitle = BooleanUtils.toBoolean(placement.getConfig().getProperty("suppressTitle")); toolMap.put("suppressTitle", suppressTitle); String doPreFetch = placement.getConfig().getProperty(Portal.JSR_168_PRE_RENDER); if ( ! "false".equals(doPreFetch) ) boolean showDirectToolUrl = !"false".equals(placement.getConfig().getProperty(Portal.TOOL_DIRECTURL_ENABLED_PROP)); toolMap.put("showDirectToolUrl", showDirectToolUrl);
menuClass = ICON_SAKAI + menuClass.replace('.', '-'); m.put("menuClass", menuClass); Properties tmp = firstTool.getConfig(); if ( tmp != null ) { String mc = tmp.getProperty(PROP_MENU_CLASS); menuClass = ICON_SAKAI + menuClass.replace('.', '-'); m.put("menuClass", menuClass); Properties tmp = placement.getConfig(); if ( tmp != null ) { String mc = tmp.getProperty(PROP_MENU_CLASS);
menuClass = ICON_SAKAI + menuClass.replace('.', '-'); m.put("menuClass", menuClass); Properties tmp = firstTool.getConfig(); if ( tmp != null ) { String mc = tmp.getProperty(PROP_MENU_CLASS); menuClass = ICON_SAKAI + menuClass.replace('.', '-'); m.put("menuClass", menuClass); Properties tmp = placement.getConfig(); if ( tmp != null ) { String mc = tmp.getProperty(PROP_MENU_CLASS);
showUsage = Boolean.parseBoolean((String)tool.getConfig().getProperty("display.usage"));
Properties config = placement == null ? null : placement.getConfig();
Properties config = placement.getConfig();
Properties config = placement.getConfig();