Package org.xwiki.tool.utils
Class OldCoreHelper
- java.lang.Object
-
- org.xwiki.tool.utils.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 Summary
Constructors Constructor Description OldCoreHelper()
Public for technical reason,create(String, File)
should be used instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static OldCoreHelper
create(String wikiId, File hibernateConfig)
static OldCoreHelper
create(org.xwiki.component.manager.ComponentManager componentManager, String wikiId, File hibernateConfig)
XWikiContext
getXWikiContext()
-
-
-
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 initializeOldCoreHelper
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 managerwikiId
- 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 initializeOldCoreHelper
instance
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getXWikiContext
public XWikiContext getXWikiContext()
- Returns:
- the XWiki context
-
-