1 package com.atlassian.activeobjects.spi;
2
3 import java.io.InputStream;
4 import java.io.OutputStream;
5
6 /**
7 * Makes backup/restore possible ;-)
8 */
9 public interface Backup {
10 /**
11 * This is the method that the application will call when doing the backup.
12 *
13 * @param os the stream to write the backup to
14 * @param monitor the progress monitor for the current backup
15 */
16 void save(OutputStream os, BackupProgressMonitor monitor);
17
18 /**
19 * <p>This is the method that the application will call when restoring data.</p>
20 *
21 * @param stream the stream of data previously backed up by the plugin.
22 * @param monitor the progress monitor for the current restore
23 */
24 void restore(InputStream stream, RestoreProgressMonitor monitor);
25
26 /**
27 * Clears the database of any AO tables.
28 */
29 void clear();
30 }