delay = OIOUtils.getTimeAsMillisecs(param.value);
else if (param.name.equalsIgnoreCase("firsttime")) {
try {
firstTime = OIOUtils.getTodayWithTime(param.value);
} catch (ParseException e) {
throw new OConfigurationException("Parameter 'firstTime' has invalid format, expected: HH:mm:ss", e);
}
} else if (param.name.equalsIgnoreCase("target.directory"))
targetDirectory = param.value;
else if (param.name.equalsIgnoreCase("db.include") && param.value.trim().length() > 0)
for (String db : param.value.split(","))
includeDatabases.add(db);
else if (param.name.equalsIgnoreCase("db.exclude") && param.value.trim().length() > 0)
for (String db : param.value.split(","))
excludeDatabases.add(db);
else if (param.name.equalsIgnoreCase("target.fileName"))
targetFileName = param.value;
else if (param.name.equalsIgnoreCase("buffer"))
bufferSize = Integer.parseInt(param.value);
else if (param.name.equalsIgnoreCase("compressionLevel"))
compressionLevel = Integer.parseInt(param.value);
}
if (delay <= 0)
throw new OConfigurationException("Cannot find mandatory parameter 'delay'");
if (!targetDirectory.endsWith("/"))
targetDirectory += "/";
final File filePath = new File(targetDirectory);
if (filePath.exists()) {
if (!filePath.isDirectory())
throw new OConfigurationException("Parameter 'path' points to a file, not a directory");
} else
// CREATE BACKUP FOLDER(S) IF ANY
filePath.mkdirs();
OLogManager.instance().info(this, "Automatic backup plugin installed and active: delay=%dms, firstTime=%s, targetDirectory=%s",