use of com.github.ktools1000.io.BackupCreator in project drbookings by DrBookings.
the class Anonymiser method main.
public static void main(final String[] args) throws Exception {
final File file = new File("/home/alex/bookings-anonym.xml");
new BackupCreator().makeBackup(file);
final DataStore ds = new XMLStorage().load(file);
for (final Iterator<BookingBeanSer> it = ds.getBookingsSer().iterator(); it.hasNext(); ) {
final BookingBeanSer bs = it.next();
bs.guestName = new RandomString().ofLength(bs.guestName.length()).toString();
}
for (final Iterator<CleaningBeanSer> it = ds.getCleaningsSer().iterator(); it.hasNext(); ) {
final CleaningBeanSer bs = it.next();
bs.name = new RandomString().ofLength(bs.name.length()).toString();
}
new XMLStorage().save(ds, file);
}
Aggregations