Search in sources :

Example 1 with AppointmentConverter

use of org.apache.openmeetings.backup.converter.AppointmentConverter in project openmeetings by apache.

the class BackupImport method importMeetingMembers.

/*
	 * ##################### Import MeetingMembers
	 *
	 * Reminder Invitations will be NOT send!
	 */
private void importMeetingMembers(File f) throws Exception {
    log.info("Appointement import complete, starting meeting members import");
    Registry registry = new Registry();
    Strategy strategy = new RegistryStrategy(registry);
    Serializer ser = new Persister(strategy);
    registry.bind(User.class, new UserConverter(userDao, userMap));
    registry.bind(Appointment.class, new AppointmentConverter(appointmentDao, appointmentMap));
    List<MeetingMember> list = readList(ser, f, "meetingmembers.xml", "meetingmembers", MeetingMember.class);
    for (MeetingMember ma : list) {
        ma.setId(null);
        meetingMemberDao.update(ma);
    }
}
Also used : UserConverter(org.apache.openmeetings.backup.converter.UserConverter) RegistryStrategy(org.simpleframework.xml.convert.RegistryStrategy) MeetingMember(org.apache.openmeetings.db.entity.calendar.MeetingMember) RegistryStrategy(org.simpleframework.xml.convert.RegistryStrategy) Strategy(org.simpleframework.xml.strategy.Strategy) Registry(org.simpleframework.xml.convert.Registry) Persister(org.simpleframework.xml.core.Persister) AppointmentConverter(org.apache.openmeetings.backup.converter.AppointmentConverter) Serializer(org.simpleframework.xml.Serializer)

Aggregations

AppointmentConverter (org.apache.openmeetings.backup.converter.AppointmentConverter)1 UserConverter (org.apache.openmeetings.backup.converter.UserConverter)1 MeetingMember (org.apache.openmeetings.db.entity.calendar.MeetingMember)1 Serializer (org.simpleframework.xml.Serializer)1 Registry (org.simpleframework.xml.convert.Registry)1 RegistryStrategy (org.simpleframework.xml.convert.RegistryStrategy)1 Persister (org.simpleframework.xml.core.Persister)1 Strategy (org.simpleframework.xml.strategy.Strategy)1