|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nuxeo.launcher.config.ConfigurationGenerator
public class ConfigurationGenerator
Builder for server configuration and datasource files from templates and properties.
Field Summary | |
---|---|
static String |
BOUNDARY_BEGIN
|
static String |
BOUNDARY_END
|
static List<String> |
DB_LIST
|
boolean |
isJBoss
|
boolean |
isJetty
|
boolean |
isTomcat
|
static String |
NUXEO_CONF
|
static String |
NUXEO_HOME
|
static String |
PARAM_FAKE_WINDOWS
|
static String |
PARAM_FORCE_GENERATION
|
static String |
PARAM_TEMPLATE_DBNAME
|
static String |
PARAM_TEMPLATE_NAME
Deprecated. use PARAM_TEMPLATES_NAME instead |
static String |
PARAM_TEMPLATES_NAME
Absolute or relative PATH to the user chosen templates (comma separated list) |
static String |
PARAM_TEMPLATES_NODB
|
static String |
PARAM_TEMPLATES_PARSING_EXTENSIONS
|
static String |
PARAM_WIZARD_DONE
|
static String |
PARAM_WIZARD_RESTART_PARAMS
|
Constructor Summary | |
---|---|
ConfigurationGenerator()
|
Method Summary | |
---|---|
void |
changeDBTemplate(String dbTemplate)
Change templates using given database template |
void |
changeTemplates(String newTemplates)
|
void |
cleanupPostWizard()
Ensure the wizard won't be started and nuxeo is ready for use |
String |
extractDatabaseTemplateName()
Extract a database template from a list of templates. |
Map<String,String> |
getChangedParameters(Map<String,String> changedParameters)
Filters given parameters including them only if (there was no previous value and new value is not empty/null) or (there was a previous value and it differs from the new value) |
File |
getConfigDir()
|
File |
getDataDir()
|
List<File> |
getIncludedTemplates()
|
File |
getInstallFile()
|
File |
getLogDir()
|
ArrayList<String> |
getLogFiles()
|
File |
getNuxeoConf()
|
File |
getNuxeoDefaultConf()
|
File |
getNuxeoHome()
|
File |
getPidDir()
|
File |
getRuntimeHome()
|
ServerConfigurator |
getServerConfigurator()
|
File |
getTmpDir()
|
Properties |
getUserConfig()
|
boolean |
init()
Initialize configurator, check requirements and load current configuration |
void |
initLogs()
Delegate logs initialization to serverConfigurator instance |
boolean |
isConfigurable()
|
boolean |
isForceGeneration()
|
boolean |
isInstallInProgress()
|
boolean |
isWizardRequired()
Check if wizard must and can be ran |
static void |
main(String[] args)
|
void |
prepareWizardStart()
Ensure the server will start only wizard application, not Nuxeo |
String |
rebuildTemplatesStr(String dbTemplate)
Rebuild a templates string for use in nuxeo.conf |
void |
run()
Runs the configuration files generation. |
void |
saveConfiguration(Map<String,String> changedParameters)
Save changed parameters in nuxeo.conf . |
void |
saveFilteredConfiguration(Map<String,String> changedParameters)
Save changed parameters in nuxeo.conf , filtering parameters with
#getChangedParametersMap(Map, Map) |
void |
setDirectoryWithProperty(String key)
|
void |
setForceGeneration(boolean forceGeneration)
|
void |
verifyInstallation()
Create needed directories. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NUXEO_HOME
public static final String NUXEO_CONF
@Deprecated public static final String PARAM_TEMPLATE_NAME
PARAM_TEMPLATES_NAME
instead
public static final String PARAM_TEMPLATES_NAME
public static final String PARAM_TEMPLATE_DBNAME
public static final String PARAM_TEMPLATES_NODB
public static final String PARAM_TEMPLATES_PARSING_EXTENSIONS
public static final String PARAM_FORCE_GENERATION
public static final String BOUNDARY_BEGIN
public static final String BOUNDARY_END
public static final List<String> DB_LIST
public static final String PARAM_WIZARD_DONE
public static final String PARAM_WIZARD_RESTART_PARAMS
public static final String PARAM_FAKE_WINDOWS
public boolean isJBoss
public boolean isJetty
public boolean isTomcat
Constructor Detail |
---|
public ConfigurationGenerator()
Method Detail |
---|
public boolean isConfigurable()
public void setForceGeneration(boolean forceGeneration)
forceGeneration
- PARAM_FORCE_GENERATION
public boolean isForceGeneration()
PARAM_FORCE_GENERATION
public Properties getUserConfig()
public final ServerConfigurator getServerConfigurator()
public void run() throws ConfigurationException
ConfigurationException
public boolean init()
public void changeTemplates(String newTemplates)
public void changeDBTemplate(String dbTemplate)
dbTemplate
- new database templatepublic void setDirectoryWithProperty(String key)
key
- Directory system keyEnvironment
public File getNuxeoHome()
public File getNuxeoDefaultConf()
public List<File> getIncludedTemplates()
public static void main(String[] args) throws ConfigurationException
ConfigurationException
public void saveConfiguration(Map<String,String> changedParameters) throws ConfigurationException
nuxeo.conf
.
This method does not check values in map. Use
saveFilteredConfiguration(Map)
for parameters filtering.
changedParameters
- Map of modified parameters
ConfigurationException
saveFilteredConfiguration(Map)
public void saveFilteredConfiguration(Map<String,String> changedParameters) throws ConfigurationException
nuxeo.conf
, filtering parameters with
#getChangedParametersMap(Map, Map)
changedParametersMaps
- Maps of modified parameters
ConfigurationException
getChangedParameters(Map)
public Map<String,String> getChangedParameters(Map<String,String> changedParameters)
changedParameters
- parameters to be filtered
public String extractDatabaseTemplateName()
rebuildTemplatesStr(String)
public File getNuxeoConf()
public void initLogs()
public File getLogDir()
public File getPidDir()
public File getDataDir()
public void verifyInstallation() throws ConfigurationException
ConfigurationException
- If a deprecated directory has been
detected.public File getTmpDir()
public ArrayList<String> getLogFiles()
public boolean isWizardRequired()
public String rebuildTemplatesStr(String dbTemplate)
dbTemplate
- database template to use instead of current one
extractDatabaseTemplateName()
,
#changeDBTemplate(String)}
,
#changeTemplates(String)}
public File getConfigDir()
public void prepareWizardStart()
public void cleanupPostWizard()
public File getRuntimeHome()
public boolean isInstallInProgress()
public File getInstallFile()
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |