use of org.simpleframework.xml.strategy.Strategy in project osm-contributor by jawg.
the class CommonSyncModule method getPersister.
@Provides
Persister getPersister() {
RegistryMatcher matchers = new RegistryMatcher();
matchers.bind(org.joda.time.DateTime.class, JodaTimeDateTimeTransform.class);
Strategy strategy = new AnnotationStrategy();
return new Persister(strategy, matchers);
}
use of org.simpleframework.xml.strategy.Strategy in project openmeetings by apache.
the class BackupExport method exportRoomGroup.
/*
* ##################### Backup Room Groups
*/
private void exportRoomGroup(ZipOutputStream zos, ProgressHolder progressHolder) throws Exception {
Registry registry = new Registry();
Strategy strategy = new RegistryStrategy(registry);
Serializer serializer = new Persister(strategy);
registry.bind(Group.class, GroupConverter.class);
registry.bind(Room.class, RoomConverter.class);
writeList(serializer, zos, "rooms_organisation.xml", "room_organisations", roomDao.getGroups());
progressHolder.setProgress(17);
}
use of org.simpleframework.xml.strategy.Strategy in project openmeetings by apache.
the class BackupExport method exportContacts.
/*
* ##################### User Contacts
*/
private void exportContacts(ZipOutputStream zos, ProgressHolder progressHolder) throws Exception {
Registry registry = new Registry();
Strategy strategy = new RegistryStrategy(registry);
Serializer serializer = new Persister(strategy);
registry.bind(User.class, UserConverter.class);
writeList(serializer, zos, "userContacts.xml", "usercontacts", userContactDao.get());
progressHolder.setProgress(60);
}
use of org.simpleframework.xml.strategy.Strategy in project openmeetings by apache.
the class BackupExport method exportMeetingMember.
/*
* ##################### Backup Meeting Members
*/
private void exportMeetingMember(ZipOutputStream zos, ProgressHolder progressHolder) throws Exception {
Registry registry = new Registry();
Strategy strategy = new RegistryStrategy(registry);
Serializer serializer = new Persister(strategy);
registry.bind(User.class, UserConverter.class);
registry.bind(Appointment.class, AppointmentConverter.class);
writeList(serializer, zos, "meetingmembers.xml", "meetingmembers", meetingMemberDao.getMeetingMembers());
progressHolder.setProgress(30);
}
use of org.simpleframework.xml.strategy.Strategy in project openmeetings by apache.
the class BackupExport method getConfigSerializer.
private static Serializer getConfigSerializer(List<Configuration> list) throws Exception {
Registry registry = new Registry();
registry.bind(User.class, UserConverter.class);
Strategy strategy = new RegistryStrategy(registry);
Serializer serializer = new Persister(strategy);
bindDate(registry, list);
return serializer;
}
Aggregations