gpt4 book ai didi

org.xwiki.bridge.event.WikiDeletedEvent.getWikiId()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 03:59:05 28 4
gpt4 key购买 nike

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

WikiDeletedEvent.getWikiId介绍

暂无

代码示例

代码示例来源:origin: org.xwiki.platform/xwiki-platform-store-filesystem-oldcore

@Override
  public void onEvent(Event event, Object source, Object data)
  {
    String wikiId = ((WikiDeletedEvent) event).getWikiId();

    File directory = this.store.getWikiDir(wikiId);

    if (directory.exists() && directory.isDirectory()) {
      try {
        FileUtils.deleteDirectory(directory);
      } catch (IOException e) {
        this.logger.error("Failed to delete storage for the wiki [{}]", wikiId, e);
      }
    }
  }
}

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

/**
 * {@inheritDoc}
 * <p>
 * Make sure to keep the {@link #alwaysUsedExtensions} map consistent when the database changes.
 * 
 * @see org.xwiki.observation.EventListener#onEvent(org.xwiki.observation.event.Event, java.lang.Object,
 *      java.lang.Object)
 */
@Override
public void onEvent(Event event, Object source, Object data)
{
  if (event instanceof WikiDeletedEvent) {
    this.alwaysUsedExtensions.remove(((WikiDeletedEvent) event).getWikiId());
  } else {
    onDocumentEvent((XWikiDocument) source, (XWikiContext) data);
  }
}

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

@Override
public void onEvent(Event event, Object source, Object data)
{
  if (event instanceof WikiDeletedEvent) {
    String wikiId = ((WikiDeletedEvent) event).getWikiId();
    try {
      onWikiDeletedEvent(wikiId);
    } catch (SchedulerException e) {
      LOGGER.error("Failed to remove schedulers for wiki [{}]", wikiId, e);
    }
  } else {
    onDocumentEvent(source, data);
  }
}

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