diff artifacts/src/main/java/de/intevation/artifacts/Artifact.java @ 4:13a12b607baf

Added mechanism to create an share a global context in the artifact database. artifacts/trunk@13 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 04 Sep 2009 08:32:09 +0000
parents 141457e0d7b1
children a5a279a0ee35
line wrap: on
line diff
--- a/artifacts/src/main/java/de/intevation/artifacts/Artifact.java	Thu Sep 03 16:13:25 2009 +0000
+++ b/artifacts/src/main/java/de/intevation/artifacts/Artifact.java	Fri Sep 04 08:32:09 2009 +0000
@@ -15,11 +15,11 @@
  *        of this artifact.</li>
  *   <li>{@link #hash() hash()}: Returns a hash value over the internal state
  *        of this artifact.</li>
- *   <li>{@link #describe()}: Returns a description of this artifact.</li>
- *   <li>{@link #advance(String) advance()}: Advances this artifact
+ *   <li>{@link #describe(Object)}: Returns a description of this artifact.</li>
+ *   <li>{@link #advance(Document, Object) advance()}: Advances this artifact
  *       to the next internal state</li>
- *   <li>{@link #feed(Document) feed()}: Feed new data into this artifact.</li>
- *   <li>{@link #out(Document) out()}: Produces output for this artifact.</li>
+ *   <li>{@link #feed(Document, Object) feed()}: Feed new data into this artifact.</li>
+ *   <li>{@link #out(Document, Object) out()}: Produces output for this artifact.</li>
  * </ol>
  *
  * @author Sascha L. Teichmann (sascha.teichmann@intevation.de)
@@ -42,29 +42,33 @@
 
     /**
      * A description used to build a interface to interact with this artifact.
+     * @param context The global context of the runtime system.
      * @return An XML representation of the current state of the artifact.
      */
-    public Document describe();
+    public Document describe(Object context);
 
     /**
      * Change the internal state of the artifact.
-     * @param target Target of internal state to move to.
      * @return An XML representation of the success of the advancing.
+     * @param target Target of internal state to move to.
+     * @param context The global context of the runtime system.
      */
-    public Document advance(String target);
+    public Document advance(Document target, Object context);
 
     /**
      * Feed data into this artifact.
      * @param data Data to feed artifact with.
+     * @param context The global context of the runtime system.
      * @return An XML representation of the success of the feeding.
      */
-    public Document feed(Document data);
+    public Document feed(Document data, Object context);
 
     /**
      * Produce output from this artifact.
      * @param format Specifies the format of the output.
+     * @param context The global context of the runtime system.
      * @return a byte representation of the output.
      */
-    public byte [] out(Document format);
+    public byte [] out(Document format, Object context);
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org