Adapt to new build system
[gpl/argeo-slc.git] / org.argeo.slc.cms / src / org / argeo / slc / backup / vfs / AtomicBackup.java
diff --git a/org.argeo.slc.cms/src/org/argeo/slc/backup/vfs/AtomicBackup.java b/org.argeo.slc.cms/src/org/argeo/slc/backup/vfs/AtomicBackup.java
new file mode 100644 (file)
index 0000000..0cfcfab
--- /dev/null
@@ -0,0 +1,22 @@
+package org.argeo.slc.backup.vfs;
+
+import org.apache.commons.vfs2.FileSystemManager;
+import org.apache.commons.vfs2.FileSystemOptions;
+
+/** Performs the backup of a single component, typically a database dump */
+public interface AtomicBackup {
+       /** Name identifiying this backup */
+       public String getName();
+
+       /**
+        * Retrieves the data of the component in a format that allows to restore
+        * the component
+        * 
+        * @param backupContext
+        *            the context of this backup
+        * @return the VFS URI of the generated file or directory
+        */
+       public String backup(FileSystemManager fileSystemManager,
+                       String backupsBase, BackupContext backupContext,
+                       FileSystemOptions opts);
+}