Codota Logo
MandatoryDocumentInitializer.getDocumentReference
Code IndexAdd Codota to your IDE (free)

How to use
getDocumentReference
method
in
com.xpn.xwiki.doc.MandatoryDocumentInitializer

Best Java code snippets using com.xpn.xwiki.doc.MandatoryDocumentInitializer.getDocumentReference (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.xwiki.platform/xwiki-platform-watchlist-api

/**
 * @param context the context to use. Since everything happens in the same thread, it's safe to assume that this is
 *            the request's context and not a synthetic one.
 */
private void reinitializeWatchListClass(XWikiContext context)
{
  String currentWikiId = context.getWikiId();
  try {
    // Reinitialize on all wikis.
    for (String wikiId : wikiDescriptorManager.getAllIds()) {
      try {
        context.setWikiId(wikiId);
        XWikiDocument document =
          context.getWiki().getDocument(watchListClassInitializer.getDocumentReference(), context);
        if (watchListClassInitializer.updateDocument(document)) {
          context.getWiki().saveDocument(document, context);
        }
      } catch (XWikiException e) {
        logger.error("Failed to re-initialize mandatory document [{}] on wiki [{}]",
          WatchListClassDocumentInitializer.DOCUMENT_FULL_NAME, wikiId, e);
      }
    }
  } catch (Exception e) {
    logger.error("Failed to re-initialize mandatory document [{}]",
      WatchListClassDocumentInitializer.DOCUMENT_FULL_NAME, e);
  } finally {
    // Restore the contex wiki.
    context.setWikiId(currentWikiId);
  }
}
origin: org.xwiki.platform/xwiki-platform-rendering-wikimacro-store

@Override
public void installOrUpgradeWikiMacroClasses() throws Exception
{
  XWikiContext xcontext = getContext();
  // Install or Upgrade XWiki.WikiMacroClass
  XWikiDocument doc = xcontext.getWiki().getDocument(this.wikiMacroInitializer.getDocumentReference(), xcontext);
  if (this.wikiMacroInitializer.updateDocument(doc)) {
    update(doc);
  }
  // Install or Upgrade XWiki.WikiMacroParameterClass
  doc = xcontext.getWiki().getDocument(WIKI_MACRO_PARAMETER_CLASS, xcontext);
  if (this.wikiMacroParameterInitializer.updateDocument(doc)) {
    update(doc);
  }
}
com.xpn.xwiki.docMandatoryDocumentInitializergetDocumentReference

Popular methods of MandatoryDocumentInitializer

  • updateDocument

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
  • notifyDataSetChanged (ArrayAdapter)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Path (java.nio.file)
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now