public abstract class ServerConfigurator extends Object
Modifier and Type | Field and Description |
---|---|
protected File |
dataDir |
protected static String |
DEFAULT_CONTEXT_NAME |
static String |
DEFAULT_DATA_DIR
Deprecated.
Since 5.9.4. Use
Environment.DEFAULT_DATA_DIR instead. |
static String |
DEFAULT_LOG_DIR
Deprecated.
Since 5.9.4. Use
Environment.DEFAULT_LOG_DIR instead. |
static String |
DEFAULT_TMP_DIR
Deprecated.
Since 5.9.4. Use
Environment.DEFAULT_TMP_DIR instead. |
protected ConfigurationGenerator |
generator |
protected File |
libDir |
protected static org.apache.commons.logging.Log |
log |
protected File |
logDir |
static List<String> |
NUXEO_SYSTEM_PROPERTIES |
protected File |
packagesDir |
protected File |
pidDir |
protected File |
tmpDir |
Constructor and Description |
---|
ServerConfigurator(ConfigurationGenerator configurationGenerator) |
Modifier and Type | Method and Description |
---|---|
protected void |
addServerSpecificParameters(Map<String,String> parametersmigration)
Override to add server specific parameters to the list of parameters to migrate
|
protected void |
checkNetwork()
Perform server specific checks, not already done by
ConfigurationGenerator.checkAddressesAndPorts() |
protected void |
checkPath(File oldPath,
String message)
Check if oldPath exist; if so, then raise a ConfigurationException with information for fixing issue
|
void |
checkPaths()
Check server paths; warn if existing deprecated paths.
|
void |
cleanupPostWizard() |
void |
dumpProperties(CryptoProperties userConfig) |
Properties |
filterSystemProperties(CryptoProperties properties)
Extract Nuxeo properties from given Properties (System properties are removed, except those set by Nuxeo)
|
abstract File |
getConfigDir() |
File |
getDataDir() |
protected String |
getDefaultDataDir() |
String |
getDefaultPackagesDir() |
String |
getDefaultTmpDir() |
File |
getDirectory(String key) |
abstract File |
getLogConfFile() |
File |
getLogDir() |
File |
getNuxeoLibDir() |
protected File |
getOutputDirectory() |
File |
getPackagesDir() |
File |
getPidDir() |
protected abstract File |
getRuntimeHome()
Returns the Home of NuxeoRuntime (same as Framework.getRuntime().getHome().getAbsolutePath())
|
abstract File |
getServerLibDir() |
File |
getTmpDir() |
void |
initLogs()
Initialize logs.
|
boolean |
isWizardAvailable()
Override it to make the wizard available for a given server.
|
protected void |
parseAndCopy(Properties config)
Generate configuration files from templates and given configuration parameters
|
void |
prepareWizardStart() |
void |
setDataDir(String dataDirStr) |
void |
setDirectory(String key,
String directory) |
void |
setLogDir(String logDirStr) |
void |
setPidDir(String pidDirStr) |
void |
setTmpDir(String tmpDirStr) |
void |
verifyInstallation() |
protected static final org.apache.commons.logging.Log log
protected final ConfigurationGenerator generator
protected File packagesDir
public static final List<String> NUXEO_SYSTEM_PROPERTIES
protected static final String DEFAULT_CONTEXT_NAME
@Deprecated public static final String DEFAULT_LOG_DIR
Environment.DEFAULT_LOG_DIR
instead.@Deprecated public static final String DEFAULT_DATA_DIR
Environment.DEFAULT_DATA_DIR
instead.@Deprecated public static final String DEFAULT_TMP_DIR
Environment.DEFAULT_TMP_DIR
instead.public ServerConfigurator(ConfigurationGenerator configurationGenerator)
protected void parseAndCopy(Properties config) throws IOException, freemarker.template.TemplateException, ConfigurationException
config
- Properties with configuration parameters for template replacementConfigurationException
IOException
freemarker.template.TemplateException
protected File getOutputDirectory()
protected String getDefaultDataDir()
protected abstract File getRuntimeHome()
public File getDataDir()
public void setDataDir(String dataDirStr)
dataDirStr
- Data directory path to setpublic void setLogDir(String logDirStr)
logDirStr
- Log directory path to setpublic void initLogs()
ConfigurationGenerator.init()
so the logDir
field is not
yet initializedpublic File getPidDir()
public void setPidDir(String pidDirStr)
pidDirStr
- Pid directory path to setpublic void checkPaths() throws ConfigurationException
ConfigurationException
- If deprecated paths have been detectedpublic String getDefaultTmpDir()
public void setTmpDir(String tmpDirStr)
tmpDirStr
- Temporary directory path to setpublic void setDirectory(String key, String directory)
key
- directory system keydirectory
- absolute or relative directory pathEnvironment
public File getDirectory(String key)
key
- directory system keyEnvironment
protected void checkPath(File oldPath, String message) throws ConfigurationException
oldPath
- Path that must NOT existmessage
- Error message thrown with exceptionConfigurationException
- If an old path has been discoveredpublic abstract File getLogConfFile()
public abstract File getConfigDir()
public void prepareWizardStart()
public void cleanupPostWizard()
public boolean isWizardAvailable()
prepareWizardStart()
,
cleanupPostWizard()
public void dumpProperties(CryptoProperties userConfig)
userConfig
- Properties to dump into config directorypublic Properties filterSystemProperties(CryptoProperties properties)
properties
- Properties to be filteredpublic File getNuxeoLibDir()
public abstract File getServerLibDir()
public void verifyInstallation() throws ConfigurationException
ConfigurationException
protected void checkNetwork() throws ConfigurationException
ConfigurationGenerator.checkAddressesAndPorts()
ConfigurationException
ConfigurationGenerator.checkAddressesAndPorts()
protected void addServerSpecificParameters(Map<String,String> parametersmigration)
parametersmigration
- public File getPackagesDir()
public String getDefaultPackagesDir()
Copyright © 2016 Nuxeo SA. All rights reserved.