public class XWikiExecutor extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BASEDIR |
static String |
DEFAULT_CONTEXT
By default assume that XWiki is deployed under the "xwiki" Servlet context.
|
static String |
DEFAULT_PORT |
static String |
DEFAULT_RMIPORT |
static String |
DEFAULT_STOPPORT |
protected static org.slf4j.Logger |
LOGGER |
static String |
URL |
static String |
VERIFY_RUNNING_XWIKI_AT_START
If defined then we check for an existing running XWiki instance before trying to start XWiki.
|
Constructor and Description |
---|
XWikiExecutor(int index) |
Modifier and Type | Method and Description |
---|---|
void |
addEnvironmentVariable(String key,
String value) |
int |
getDebugPort() |
String |
getExecutionDirectory() |
int |
getPort() |
int |
getRMIPort() |
int |
getStopPort() |
String |
getURL() |
String |
getWebInfDirectory() |
String |
getXWikiCfgPath() |
String |
getXWikiPropertiesPath() |
boolean |
isManaged() |
Properties |
loadXWikiCfg() |
Properties |
loadXWikiProperties() |
org.apache.commons.configuration2.PropertiesConfiguration |
loadXWikiPropertiesConfiguration() |
void |
saveXWikiCfg(Properties properties) |
void |
saveXWikiProperties() |
void |
saveXWikiProperties(Properties properties)
Deprecated.
since 4.2M1 use
saveXWikiProperties() instead |
void |
setTimeoutSeconds(long timeoutSeconds)
Change the timeout checked when starting and initializing XWiki.
|
void |
setXWikiOpts(String opts) |
void |
start()
Start XWiki using the following strategy:
If the
xwiki.test.startXWiki system property is set to "false" then don't start/stop XWiki
If the VERIFY_RUNNING_XWIKI_AT_START property is set then checks if an XWiki instance is already
running before trying to start XWiki and if so, reuse it and don't start XWiki
If the VERIFY_RUNNING_XWIKI_AT_START property is set to false then verify if some XWiki instance is
already running by verifying if the port is free and fail if so. |
void |
stop() |
protected static final org.slf4j.Logger LOGGER
public static final String VERIFY_RUNNING_XWIKI_AT_START
public static final String BASEDIR
public static final String URL
public static final String DEFAULT_CONTEXT
public static final String DEFAULT_PORT
public static final String DEFAULT_STOPPORT
public static final String DEFAULT_RMIPORT
public int getPort()
public int getStopPort()
public int getRMIPort()
public int getDebugPort()
public String getExecutionDirectory()
public void setXWikiOpts(String opts)
public void setTimeoutSeconds(long timeoutSeconds)
public boolean isManaged()
public void start() throws Exception
xwiki.test.startXWiki
system property is set to "false" then don't start/stop XWikiVERIFY_RUNNING_XWIKI_AT_START
property is set then checks if an XWiki instance is already
running before trying to start XWiki and if so, reuse it and don't start XWikiVERIFY_RUNNING_XWIKI_AT_START
property is set to false then verify if some XWiki instance is
already running by verifying if the port is free and fail if so. Otherwise start XWiki.Exception
- when failing to start XWikipublic String getWebInfDirectory()
public String getXWikiCfgPath()
public String getXWikiPropertiesPath()
public Properties loadXWikiCfg() throws Exception
Exception
public Properties loadXWikiProperties() throws Exception
Exception
public org.apache.commons.configuration2.PropertiesConfiguration loadXWikiPropertiesConfiguration() throws Exception
Exception
public void saveXWikiCfg(Properties properties) throws Exception
Exception
@Deprecated public void saveXWikiProperties(Properties properties) throws Exception
saveXWikiProperties()
insteadException
public void saveXWikiProperties() throws Exception
Exception
public String getURL()
Copyright © 2004–2021 XWiki. All rights reserved.