Merge commit '42b2e5ca519766e37ce6941ba4faecc9691cc403' into upstream
[debian/openrocket] / core / src / net / sf / openrocket / plugin / Configurable.java
diff --git a/core/src/net/sf/openrocket/plugin/Configurable.java b/core/src/net/sf/openrocket/plugin/Configurable.java
new file mode 100644 (file)
index 0000000..b8ebf6e
--- /dev/null
@@ -0,0 +1,29 @@
+package net.sf.openrocket.plugin;
+
+public interface Configurable {
+       
+       
+       /**
+        * Return the plugin ID.  This is a text string uniquely identifying this plugin.
+        * The recommended format is similar to the fully-qualified class name of the
+        * plugin, though a shorter format starting with the developer's domain name
+        * is also possible for future compatibility.
+        * 
+        * @return      the plugin ID
+        */
+       public String getPluginID();
+       
+       /**
+        * Test whether this plugin provides functionality corresponding to the specified
+        * plugin ID.  This provides backwards compatibility if the plugin ID should change.
+        * 
+        * @param pluginID      the plugin ID to test
+        * @return                      whether this plugin provides the requested functionality
+        */
+       public boolean isCompatible(String pluginID);
+       
+       public void loadFromXML(Object... objects);
+       
+       public void saveToXML(Object... objects);
+       
+}