use of org.apache.openmeetings.installation.InstallationConfig in project openmeetings by apache.
the class BackupExport method main.
public static void main(String[] args) throws Exception {
List<Configuration> list = ImportInitvalues.initialCfgs(new InstallationConfig());
Serializer ser = getConfigSerializer(list);
ByteArrayOutputStream baos = stream(ser, "configs", list);
File f = new File(args[0]);
if (!f.exists() && !f.getParentFile().exists()) {
f.getParentFile().mkdirs();
}
Files.write(Paths.get(args[0]), baos.toByteArray(), StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);
}
use of org.apache.openmeetings.installation.InstallationConfig in project openmeetings by apache.
the class AbstractJUnitDefaults method makeDefaultScheme.
private static void makeDefaultScheme(ImportInitvalues importInitvalues) throws Exception {
InstallationConfig cfg = new InstallationConfig();
cfg.setUsername(adminUsername);
cfg.setPassword(userpass);
cfg.setEmail(email);
cfg.setGroup(group);
cfg.setTimeZone(timeZone);
importInitvalues.loadAll(cfg, false);
// regular user
importInitvalues.createSystemUser(getUser(UUID.randomUUID().toString()), group, regularUsername, userpass, false);
// group admin
importInitvalues.createSystemUser(getUser(UUID.randomUUID().toString()), group, groupAdminUsername, userpass, true);
}
Aggregations