org.sakaiproject.tool.api.Placement.getToolId()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中org.sakaiproject.tool.api.Placement.getToolId()方法的一些代码示例,展示了Placement.getToolId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Placement.getToolId()方法的具体详情如下:
包路径:org.sakaiproject.tool.api.Placement
类名称:Placement
方法名:getToolId

Placement.getToolId介绍

[英]Access the well-known tool-id of the tool associated with this placement.
[中]访问与此放置关联的工具的已知工具id。

代码示例

代码示例来源:origin: sakaiproject/sakai

private String placementDisplay()
{
  ResourceBundle rb = rbDefault;
  StringBuilder sb = new StringBuilder();
  try
  {
    Placement p = ToolManager.getCurrentPlacement();
    if (p != null)
    {
      sb.append(rb.getString("bugreport.placement")).append("\n");
      sb.append(rb.getString("bugreport.placement.id")).append(p.getToolId())
          .append("\n");
      sb.append(rb.getString("bugreport.placement.context")).append(
          p.getContext()).append("\n");
      sb.append(rb.getString("bugreport.placement.title")).append(p.getTitle())
          .append("\n");
    }
    else
    {
      sb.append(rb.getString("bugreport.placement")).append("\n");
      sb.append(rb.getString("bugreport.placement.none")).append("\n");
    }
  }
  catch (Exception ex)
  {
    log.error("Failed to generate placement display", ex);
    sb.append("Error " + ex.getMessage());
  }
  return sb.toString();
}

代码示例来源:origin: org.sakaiproject.basiclti/basiclti-common

public static String getCorrectProperty(Properties config,
    String propName, Placement placement)
{
  // Check for global overrides in properties
  String allowSettings = ServerConfigurationService.getString(BASICLTI_SETTINGS_ENABLED, BASICLTI_SETTINGS_ENABLED_DEFAULT);
  if ( LTIService.LTI_ALLOWSETTINGS.equals(propName) && ! "true".equals(allowSettings) ) return "false";
  String allowRoster = ServerConfigurationService.getString(BASICLTI_ROSTER_ENABLED, BASICLTI_ROSTER_ENABLED_DEFAULT);
  if ( LTIService.LTI_ALLOWROSTER.equals(propName) && ! "true".equals(allowRoster) ) return "false";
  String allowContentLink = ServerConfigurationService.getString(BASICLTI_CONTENTLINK_ENABLED, BASICLTI_CONTENTLINK_ENABLED_DEFAULT);
  if ( "contentlink".equals(propName) && ! "true".equals(allowContentLink) ) return null;
  // Check for explicit setting in properties
  String propertyName = placement.getToolId() + "." + propName;
  String propValue = ServerConfigurationService.getString(propertyName,null);
  if ( propValue != null && propValue.trim().length() > 0 ) {
    log.debug("Sakai.home {}={}", propName, propValue);
    return propValue;
  }
  // Take it from the placement
  return config.getProperty("imsti."+propName, null);
}

代码示例来源:origin: sakaiproject/sakai

public static String getCorrectProperty(Properties config,
    String propName, Placement placement) {
  // Check for global overrides in properties
  if (LTIService.LTI_ALLOWSETTINGS.equals(propName) && !settingsEnabled()) {
    return "false";
  }
  if (LTIService.LTI_ALLOWROSTER.equals(propName) && !rosterEnabled()) {
    return "false";
  }
  if ("contentlink".equals(propName) && !contentLinkEnabled()) {
    return null;
  }
  // Check for explicit setting in properties
  String propertyName = placement.getToolId() + "." + propName;
  String propValue = ServerConfigurationService.getString(propertyName, null);
  if (propValue != null && propValue.trim().length() > 0) {
    log.debug("Sakai.home {}={}", propName, propValue);
    return propValue;
  }
  // Take it from the placement
  return config.getProperty("imsti." + propName, null);
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

if (log.isDebugEnabled()) log.debug("requiredPermissionsString=" + requiredPermissionsString + " for " + placement.getToolId());
if (requiredPermissionsString == null)
  return true;

代码示例来源:origin: sakaiproject/sakai

if (placement != null)
  toolId = placement.getToolId();

代码示例来源:origin: org.sakaiproject.signup/signup-impl

String signupToolId=null;
try{
  signupToolId = toolManager.getCurrentPlacement().getToolId();

代码示例来源:origin: org.sakaiproject.velocity/sakai-velocity-tool

if (placement != null)
  toolId = placement.getToolId();

代码示例来源:origin: sakaiproject/sakai

String stoolContext = sctx.toString();
ActiveTool stool = ActiveToolManager.getActiveTool(p.getToolId());
String sskin = ss.getSkin();
setupForward(sreq, res, splacement, sskin);

代码示例来源:origin: org.sakaiproject.portal/sakai-portal-impl

String stoolContext = sctx.toString();
ActiveTool stool = ActiveToolManager.getActiveTool(p.getToolId());
String sskin = ss.getSkin();
setupForward(sreq, res, splacement, sskin);

代码示例来源:origin: org.sakaiproject.portal/sakai-portal-render-impl

String stoolContext = ss.getToolContextPath();
String stoolPathInfo = ss.getToolPathInfo();
ActiveTool stool = ActiveToolManager.getActiveTool(p.getToolId());
String sskin = ss.getSkin();
req.setAttribute(ToolURL.MANAGER, new ToolURLManagerImpl(res));

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

&& arrayContains(((Map) session.getAttribute("delegatedaccess.deniedToolsMap")).get(site.getReference()), placement.getToolId())){
return false;
      && arrayContains(((String) site.getProperties().get("shopping-period-public-tools")).split(";"), placement.getToolId());
  if(session.getUserId() == null){
    return anonAccess;
  }else{
    return anonAccess || (site.getProperties().get("shopping-period-auth-tools") != null && arrayContains(((String) site.getProperties().get("shopping-period-auth-tools")).split(";"), placement.getToolId()));

相关文章