use of org.simpleframework.xml.strategy.Strategy in project openmeetings by apache.
the class BackupExport method exportFile.
/*
* ##################### File-Explorer
*/
private void exportFile(ZipOutputStream zos, ProgressHolder progressHolder) throws Exception {
List<FileItem> list = fileItemDao.get();
Registry registry = new Registry();
Strategy strategy = new RegistryStrategy(registry);
Serializer serializer = new Persister(strategy);
bindDate(registry, list);
writeList(serializer, zos, "fileExplorerItems.xml", "fileExplorerItems", list);
progressHolder.setProgress(65);
}
use of org.simpleframework.xml.strategy.Strategy in project openmeetings by apache.
the class BackupExport method exportCalendar.
/*
* ##################### Backup Calendars
*/
private void exportCalendar(ZipOutputStream zos, ProgressHolder progressHolder) throws Exception {
List<OmCalendar> list = calendarDao.get();
Registry registry = new Registry();
Strategy strategy = new RegistryStrategy(registry);
Serializer serializer = new Persister(strategy);
registry.bind(User.class, UserConverter.class);
writeList(serializer, zos, "calendars.xml", "calendars", list);
progressHolder.setProgress(22);
}
use of org.simpleframework.xml.strategy.Strategy in project openmeetings by apache.
the class BackupExport method exportGroups.
/*
* ##################### Backup Groups
*/
private void exportGroups(ZipOutputStream zos, ProgressHolder progressHolder) throws Exception {
Registry registry = new Registry();
Strategy strategy = new RegistryStrategy(registry);
Serializer ser = new Persister(strategy);
List<Group> list = groupDao.get(0, Integer.MAX_VALUE);
bindDate(registry, list);
writeList(ser, zos, "organizations.xml", "organisations", list);
progressHolder.setProgress(5);
}
use of org.simpleframework.xml.strategy.Strategy in project openmeetings by apache.
the class BackupExport method exportPrivateMsg.
/*
* ##################### Private Messages
*/
private void exportPrivateMsg(ZipOutputStream zos, ProgressHolder progressHolder) throws Exception {
List<PrivateMessage> list = privateMessageDao.get(0, Integer.MAX_VALUE);
Registry registry = new Registry();
Strategy strategy = new RegistryStrategy(registry);
Serializer serializer = new Persister(strategy);
registry.bind(User.class, UserConverter.class);
registry.bind(Room.class, RoomConverter.class);
bindDate(registry, list, PrivateMessage::getInserted);
writeList(serializer, zos, "privateMessages.xml", "privatemessages", list);
progressHolder.setProgress(50);
}
use of org.simpleframework.xml.strategy.Strategy in project openmeetings by apache.
the class BackupExport method exportUsers.
/*
* ##################### Backup Users
*/
private void exportUsers(ZipOutputStream zos, ProgressHolder progressHolder) throws Exception {
Registry registry = new Registry();
Strategy strategy = new RegistryStrategy(registry);
Serializer ser = new Persister(strategy);
registry.bind(Group.class, GroupConverter.class);
registry.bind(Salutation.class, SalutationConverter.class);
List<User> list = userDao.getAllBackupUsers();
bindDate(registry, list);
writeList(ser, zos, "users.xml", "users", list);
progressHolder.setProgress(10);
}
Aggregations