com.xpn.xwiki.web.Utils.getContext()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(118)

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

Utils.getContext介绍

暂无

代码示例

代码示例来源:origin: org.xwiki.platform/xwiki-platform-skin-skinx

XWikiContext context = Utils.getContext();

代码示例来源:origin: org.phenotips/medsavant-client-api

String url = getMethodURL("UploadManager", "upload");
String eid = identifiers.get("external_id");
XWikiContext context = Utils.getContext();
XWikiDocument doc = context.getWiki().getDocument(patient.getDocument(), context);
method = new HttpPost(url);

代码示例来源:origin: org.phenotips/anonymous-communication

@Override
public int sendSuccessMail(Connection connection)
{
  try {
    Map<String, Object> options = new HashMap<String, Object>();
    XWikiContext context = Utils.getContext();
    XWiki xwiki = context.getWiki();
    MailSenderPlugin mailsender = (MailSenderPlugin) xwiki.getPlugin(MAIL_SENDER, context);
    String to = getEmail(connection.getInitiatingUser());
    options.put("platformName", PLATFORM);
    options.put(SUBJECT_FIELD_STRING, SUBJECT);
    options.put(RECIPIENT_NAME,
      xwiki.getUserName(connection.getInitiatingUser().toString(), null, false, context));
    options.put(CONTACTED_USER_NAME,
      xwiki.getUserName(connection.getContactedUser().toString(), null, false, context));
    options.put(MATCH_CASE_ID, connection.getTargetPatient().getDocument().getName());
    options.put("matchCaseReferenceId", connection.getReferencePatient().getDocument().getName());
    options.put(MATCH_CASE_LINK, xwiki.getDocument(connection.getTargetPatient().getDocument(), context)
      .getExternalURL(EXTERNAL_LINK_MODE, context));
    options.put("matchCaseReferenceLink",
      xwiki.getDocument(connection.getReferencePatient().getDocument(), context)
        .getExternalURL(EXTERNAL_LINK_MODE, context));
    mailsender.sendMailFromTemplate("PhenoTips.MatchSuccessContact", PHENOMECENTRAL_EMAIL,
      to, null, null, "", options, context);
    return 0;
  } catch (Exception ex) {
    this.logger.error(FAILED_MAIL_MSG, ex.getMessage(), ex);
    return 1;
  }
}

代码示例来源:origin: org.phenotips/anonymous-communication

XWikiContext context = Utils.getContext();
XWiki xwiki = context.getWiki();
MailSenderPlugin mailsender = (MailSenderPlugin) xwiki.getPlugin(MAIL_SENDER, context);

相关文章

微信公众号

最新文章

更多