gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-22 04:09:05 25 4
gpt4 key购买 nike

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

XWikiURLFactoryService.createURLFactory介绍

暂无

代码示例

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

public void addPlugins(String[] classNames, XWikiContext context)
{
  if (context.getURLFactory() == null) {
    context
      .setURLFactory(context.getWiki().getURLFactoryService().createURLFactory(context.getMode(), context));
  }
  initInterface();
  for (int i = 0; i < classNames.length; i++) {
    addPlugin(classNames[i], classNames[i], context);
  }
}

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

protected boolean prepareAction(String action, XWikiRequest request, XWikiResponse response,
  XWikiEngineContext engine_context, XWikiContext context) throws XWikiException, IOException
{
  XWiki xwiki = XWiki.getXWiki(context);
  Utils.handleMultipart(processMultipart(request.getHttpServletRequest()), context);
  XWikiURLFactory urlf = xwiki.getURLFactoryService().createURLFactory(context.getMode(), context);
  context.setURLFactory(urlf);
  VelocityManager velocityManager =
    (VelocityManager) Utils.getComponent(VelocityManager.class);
  VelocityContext vcontext = velocityManager.getVelocityContext();
  
  return xwiki.prepareDocuments(request, context, vcontext);
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-application-manager-api

@Override
public void init(XWikiContext context)
{
  this.applicationManager = new ApplicationManager();
  String database = context.getWikiId();
  try {
    XWikiURLFactory urlf =
      context.getWiki().getURLFactoryService().createURLFactory(context.getMode(), context);
    context.setURLFactory(urlf);
    context.setWikiId(context.getMainXWiki());
    this.applicationManager.init(context);
  } catch (XWikiException e) {
    LOGGER.error(
      this.localizationManager.getTranslationPlain(
        ApplicationManagerMessageTool.LOG_REFRESHALLTRANSLATIONS), e);
  } finally {
    context.setWikiId(database);
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-annotation-rest

context.setMode(XWikiContext.MODE_SERVLET);
XWikiURLFactory urlf =
  context.getWiki().getURLFactoryService().createURLFactory(context.getMode(), context);
context.setURLFactory(urlf);

代码示例来源:origin: org.xwiki.platform/xwiki-platform-gwt-api

/**
 * Initialize XWiki Context and XWiki Container Objects.
 */
private void initXWiki() throws Exception
{
  XWikiEngineContext engine = new XWikiServletContext(getServletContext());
  XWikiRequest request = new XWikiServletRequest(getThreadLocalRequest());
  XWikiResponse response = new XWikiServletResponse(getThreadLocalResponse());
  XWikiContext context = Utils.prepareContext("", request, response, engine);
  context.setMode(XWikiContext.MODE_GWT);
  context.setWikiId("xwiki");
  initializeContainerComponent(context);
  XWiki xwiki = XWiki.getXWiki(context);
  XWikiURLFactory urlf = xwiki.getURLFactoryService().createURLFactory(context.getMode(), context);
  context.setURLFactory(urlf);
  xwiki.prepareResources(context);
  String username = "XWiki.XWikiGuest";
  if (context.getMode() == XWikiContext.MODE_GWT_DEBUG) {
    username = "XWiki.superadmin";
  }
  XWikiUser user = context.getWiki().checkAuth(context);
  if (user != null) {
    username = user.getUser();
  }
  context.setUser(username);
  if (context.getDoc() == null) {
    context.setDoc(new XWikiDocument("Fake", "Document"));
  }
  context.put("ajax", new Boolean(true));
}

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

XWikiURLFactory urlf = xwiki.getURLFactoryService().createURLFactory(context.getMode(), context);
context.setURLFactory(urlf);

代码示例来源:origin: org.xwiki.platform/xwiki-platform-scheduler-api

xurf = context.getWiki().getURLFactoryService().createURLFactory(context.getMode(), context);

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

/**
   * {@inheritDoc}
   */
  @Override
  public String render(XWikiContext context) throws XWikiException
  {
    XWikiURLFactory urlf =
      context.getWiki().getURLFactoryService().createURLFactory(XWikiContext.MODE_PDF, context);
    context.setURLFactory(urlf);
    PdfExportImpl pdfexport = new PdfExportImpl();
    XWikiDocument doc = context.getDoc();
    handleRevision(context);

    try {
      context.getResponse().setContentType(ExportType.PDF.getMimeType());
      context.getResponse().addHeader(
        "Content-disposition", "inline; filename="
        + Util.encodeURI(doc.getDocumentReference().getLastSpaceReference().getName(), context) + "_"
        + Util.encodeURI(doc.getDocumentReference().getName(), context) + "." + ExportType.PDF.getExtension());

      pdfexport.export(doc, context.getResponse().getOutputStream(), ExportType.PDF, context);
    } catch (IOException e) {
      throw new XWikiException(XWikiException.MODULE_XWIKI_APP,
        XWikiException.ERROR_XWIKI_APP_SEND_RESPONSE_EXCEPTION, "Exception while sending response", e);
    }
    return null;
  }
}

代码示例来源:origin: com.xpn.xwiki.platform.plugins/xwiki-plugin-scheduler

xurf = context.getWiki().getURLFactoryService().createURLFactory(context.getMode(), context);

代码示例来源:origin: org.xwiki.platform/xwiki-platform-webdav-server

XWikiURLFactory urlf = xwiki.getURLFactoryService().createURLFactory(xwikiContext.getMode(), xwikiContext);
xwikiContext.setURLFactory(urlf);
xwiki.prepareResources(xwikiContext);

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com