performInitialisation(null);
}
public void performInitialisation(Boolean dbIsEmptyContent) {
try {
WGFileContainer fc = _db.getFileContainer("system");
// Build shortcuts so they are available in setup scripts
_core.buildDesignShortcuts(_db);
// Actions to perform on an db with empty acl (this will not be disabled with _initDisabled since even design provider plugins need general access)
if (_info != null && _info.getCsConfig() != null && _initACL) {
doEmptyACLActions(_db, _info.getCsConfig());
}
// Actions to bypass if initialisation is disabled
if (!_initDisabled) {
// Actions to perform on a content-empty db
boolean isEmptyContent = _db.isContentEmpty();
if (dbIsEmptyContent != null) {
isEmptyContent = dbIsEmptyContent.booleanValue();
}
// Process init dump
if (fc != null && isEmptyContent) {
String initDump;
if (_db.hasAttribute(WGACore.DBATTRIB_PLUGIN_VERSION) && fc.hasFile(INITDUMP_PLUGIN)) {
initDump = INITDUMP_PLUGIN;
}
else {
initDump = INITDUMP_CS;
}
if (fc.getFileNames().contains(initDump)) {
_log.info("Importing initial data for empty database '" + _db.getDbReference() + "'");
_core.importContentStoreDump(new ZipInputStream(fc.getFileData(initDump)), _db);
}
}
// We directly init HDB for this database if the system file container has a hdb model descriptor file
// So following scripts can use implicit model containers
if (fc != null && fc.hasFile(HDBModel.MODEL_FILE)) {
WGHierarchicalDatabase.getOrCreateInstance(_db);
}
// Process schema
if (_info != null && _info.getSchema() != null) {