\r
// Please document this step\r
propagateConfiguredProperties();\r
+ \r
+ // Create or update Nuxeo's per-repository configuration files.\r
createOrUpdateNuxeoRepositoryConfigFiles();\r
- \r
- createNuxeoDatabases();\r
+ \r
+ // Create the Nuxeo-managed databases, along with the requisite\r
+ // access rights to each.\r
+ HashSet<String> dbsCheckedOrCreated = createNuxeoDatabases();\r
+ \r
+ // Update the SQL script that drops databases, so they can be\r
+ // reinitialized, to reflect each of the Nuxeo-managed databases.\r
+ updateInitializationScript(dbsCheckedOrCreated);\r
\r
//\r
// Start up and initialize our embedded Nuxeo instance.\r
* There may be only one, one per tenant, or something in between.\r
* \r
*/\r
- private void createNuxeoDatabases() throws Exception {\r
+ private HashSet<String> createNuxeoDatabases() throws Exception {\r
final String DB_EXISTS_QUERY_PSQL = \r
"SELECT 1 AS result FROM pg_database WHERE datname=?";\r
final String DB_EXISTS_QUERY_MYSQL = \r
se.printStackTrace();\r
}\r
}\r
+ \r
+ return nuxeoDBsChecked;\r
\r
}\r
\r
String.format("%s Repository", repositoryName));\r
return repoConfigDoc;\r
}\r
+\r
+ private void updateInitializationScript(HashSet<String> dbsCheckedOrCreated) {\r
+ for (String dbName : dbsCheckedOrCreated) {\r
+ logger.debug("dbName=" + dbName);\r
+ }\r
+ }\r
}\r