gpt4 book ai didi

com.xpn.xwiki.api.XWiki.hasAdminRights()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 08:35:05 35 4
gpt4 key购买 nike

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

XWiki.hasAdminRights介绍

暂无

代码示例

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

/**
 * Privileged API to set/unset the readonly status of the Wiki After setting this to true no writing to the database
 * will be performed All Edit buttons will be removed and save actions disabled This is used for maintenance
 * purposes
 * 
 * @param ro true to set read-only mode/false to unset
 */
public void setReadOnly(boolean ro)
{
  if (hasAdminRights()) {
    this.xwiki.setReadOnly(ro);
  }
}

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

/**
 * Priviledge API to regenerate the links/backlinks table Normally links and backlinks are stored when a page is
 * modified This function will regenerate all the backlinks This function can be long to run
 * 
 * @throws XWikiException exception if the generation fails
 */
public void refreshLinks() throws XWikiException
{
  if (hasAdminRights()) {
    this.xwiki.refreshLinks(getXWikiContext());
  }
}

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

/**
 * Starts a rebuild of the whole index.
 * 
 * @param wiki
 * @param context
 * @return Number of documents scheduled for indexing. -1 in case of errors
 * @deprecated use rebuildIndex without context values
 */
@Deprecated
public int rebuildIndex(com.xpn.xwiki.api.XWiki wiki, Context context)
{
  if (wiki.hasAdminRights()) {
    return getProtectedPlugin().rebuildIndex(context.getContext());
  }
  return REBUILD_NOT_ALLOWED;
}

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