org.nuxeo.ecm.platform.actions.Action.setLink()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(81)

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

Action.setLink介绍

暂无

代码示例

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-core

/**
 * Returns all popup actions: used to construct HTML menu template.
 */
public List<Action> getUnfiltredPopupActions() {
  if (unfiltredActions == null) {
    computeUnfiltredPopupActions();
  }
  // post filters links to add docId
  for (Action act : unfiltredActions) {
    String lnk = act.getLink();
    if (lnk.startsWith("javascript:")) {
      lnk = lnk.replaceFirst("javascript:", "");
      act.setLink(lnk);
    }
  }
  return unfiltredActions;
}

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-actions-core

/**
 * Displays specific help messages for migration of actions.
 *
 * @since 6.0
 */
protected boolean applyCustomCompatibility(String compatType, Action action) {
  // 6.0 BBB: home/admin tab actions migrated to widgets
  if ("admin_rest_document_link".equals(compatType) || "home_rest_document_link".equals(compatType)) {
    boolean applied = false;
    String link = action.getLink();
    if (link != null && !link.startsWith("/")) {
      action.setLink("/" + link);
      applied = true;
    }
    if (applied) {
      log.warn(String.format(
          "Applied compatibility to action '%s', its configuration "
              + "should be reviewed: make sure the link references an " + "absolute path",
          action.getId()));
      return true;
    }
  }
  return false;
}

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-actions-core

dest.setLink(newLink);

相关文章