@Component(roles=OldCoreHelper.class) @Singleton public class OldCoreHelper extends Object implements AutoCloseable
Constructor and Description |
---|
OldCoreHelper()
Public for technical reason,
create(String, File) should be used instead. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static OldCoreHelper |
create(org.xwiki.component.manager.ComponentManager componentManager,
String wikiId,
File hibernateConfig) |
static OldCoreHelper |
create(String wikiId,
File hibernateConfig) |
XWikiContext |
getXWikiContext() |
public OldCoreHelper()
create(String, File)
should be used instead.public static OldCoreHelper create(String wikiId, File hibernateConfig) throws org.apache.maven.plugin.MojoExecutionException
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)OldCoreHelper
org.apache.maven.plugin.MojoExecutionException
- when failing to initialize OldCoreHelper
instancepublic static OldCoreHelper create(org.xwiki.component.manager.ComponentManager componentManager, String wikiId, File hibernateConfig) throws org.apache.maven.plugin.MojoExecutionException
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)OldCoreHelper
org.apache.maven.plugin.MojoExecutionException
- when failing to initialize OldCoreHelper
instancepublic void close() throws Exception
close
in interface AutoCloseable
Exception
public XWikiContext getXWikiContext()
Copyright © 2004–2021 XWiki. All rights reserved.