com.atlassian.plugin.web.WebInterfaceManager.getDisplayableItems()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(93)

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

WebInterfaceManager.getDisplayableItems介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.refapp/atlassian-refapp-web-item-plugin

public List<WebItemModuleDescriptor> getDisplayableItems(String section, Map<String, Object> context) {
  return webInterfaceManager.getDisplayableItems(section, context);
}

代码示例来源:origin: com.atlassian.jira/jira-api

public List<WebItemModuleDescriptor> getDisplayableItems(String section, ApplicationUser remoteUser, JiraHelper jiraHelper)
{
  return webInterfaceManager.getDisplayableItems(section, makeContext(remoteUser, jiraHelper));
}

代码示例来源:origin: com.atlassian.devrel/developer-toolbox-plugin

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
  Map<String, Object> context = Maps.newHashMap();
  Map<String, Object> condition = Maps.newHashMap();
  context.put("navBarItems", webInterfaceManager.getDisplayableItems("dev-toolbar", condition));
  context.put("navBarMenuItems", webInterfaceManager.getDisplayableItems("dev-toolbar-menu", condition));
  context.put("app", applicationProperties);
  context.put("sdkVersion", System.getProperty("atlassian.sdk.version", "3.7 or earlier"));
  context.put("devToolboxVersion",pluginAccessor.getPlugin("com.atlassian.devrel.developer-toolbox-plugin").getPluginInformation().getVersion());
  if (pluginAccessor.isPluginEnabled("com.atlassian.labs.fastdev-plugin")){
    context.put("fastDevVersion",pluginAccessor.getPlugin("com.atlassian.labs.fastdev-plugin").getPluginInformation().getVersion());
  } else {
    context.put("fastDevVersion", "disabled");
  }
  resp.setContentType("text/html;charset=utf-8");
  renderer.render(TOOLBAR_TEMPLATE, context, resp.getWriter());
}

代码示例来源:origin: com.atlassian.applinks/applinks-common

@Nonnull
public WebItemEntityList getWebItemsForLocation(final String location, final WebFragmentContext context) {
  final List<WebItemEntity> webItems = new ArrayList<WebItemEntity>();
  final Map<String, Object> contextMap = context.getContextMap();
  final HttpServletRequest request = CurrentContext.getHttpServletRequest();
  for (final WebItemModuleDescriptor descriptor : webInterfaceManager.getDisplayableItems(location, contextMap)) {
    final WebLink link = descriptor.getLink();
    final WebIcon icon = descriptor.getIcon();
    final WebItemEntity.Builder itemBuilder = new WebItemEntity.Builder();
    itemBuilder.id(link.getId());
    itemBuilder.url(link.getDisplayableUrl(request, new HashMap<>(contextMap)));
    if (link.hasAccessKey()) {
      itemBuilder.accessKey(link.getAccessKey(new HashMap<>(contextMap)));
    }
    if (icon != null) {
      itemBuilder.iconUrl(icon.getUrl().getDisplayableUrl(request, new HashMap<>(contextMap)));
      itemBuilder.iconHeight(icon.getHeight());
      itemBuilder.iconWidth(icon.getWidth());
    }
    if (descriptor.getWebLabel() != null) {
      itemBuilder.label(descriptor.getWebLabel().getDisplayableLabel(request, new HashMap<>(contextMap)));
    }
    if (descriptor.getTooltip() != null) {
      itemBuilder.tooltip(descriptor.getTooltip().getDisplayableLabel(request, new HashMap<>(contextMap)));
    }
    itemBuilder.styleClass(descriptor.getStyleClass());
    webItems.add(itemBuilder.build());
  }
  return new WebItemEntityList(webItems);
}

代码示例来源:origin: com.atlassian.applinks/applinks-plugin-core

final HttpServletRequest request = CurrentContext.getHttpServletRequest();
for (final WebItemModuleDescriptor descriptor : webInterfaceManager.getDisplayableItems(location, contextMap))

相关文章