Class OldCoreHelper

  • All Implemented Interfaces:
    AutoCloseable

    @Component(roles=OldCoreHelper.class)
    @Singleton
    public class OldCoreHelper
    extends Object
    implements AutoCloseable
    Helper to manipulate oldcore APIs.
    Since:
    9.5RC1
    Version:
    $Id: 3fd5cbf511e486ad73babb1d6ecf0eb28ebb993f $
    • Constructor Detail

      • OldCoreHelper

        public OldCoreHelper()
        Public for technical reason, create(String, File) should be used instead.
    • Method Detail

      • create

        public static OldCoreHelper create​(String wikiId,
                                           File hibernateConfig)
                                    throws org.apache.maven.plugin.MojoExecutionException
        Parameters:
        wikiId - id of the wiki for which to prepare the XWiki Context (e.g. xwiki)
        hibernateConfig - the Hibernate config fill containing the database definition (JDBC driver, username and password, etc)
        Returns:
        an initialized instance of OldCoreHelper
        Throws:
        org.apache.maven.plugin.MojoExecutionException - when failing to initialize OldCoreHelper instance
      • create

        public static OldCoreHelper create​(org.xwiki.component.manager.ComponentManager componentManager,
                                           String wikiId,
                                           File hibernateConfig)
                                    throws org.apache.maven.plugin.MojoExecutionException
        Parameters:
        componentManager - the component manager
        wikiId - id of the wiki for which to prepare the XWiki Context (e.g. xwiki)
        hibernateConfig - the Hibernate config fill containing the database definition (JDBC driver, username and password, etc)
        Returns:
        an initialized instance of OldCoreHelper
        Throws:
        org.apache.maven.plugin.MojoExecutionException - when failing to initialize OldCoreHelper instance
      • getXWikiContext

        public XWikiContext getXWikiContext()
        Returns:
        the XWiki context