Mercurial > dive4elements > framework
diff artifacts/src/main/java/de/intevation/artifacts/Artifact.java @ 32:c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
artifacts/trunk@78 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 13 Sep 2009 14:50:53 +0000 |
parents | c4d85a8532d1 |
children | 4ae4dc99127d |
line wrap: on
line diff
--- a/artifacts/src/main/java/de/intevation/artifacts/Artifact.java Sat Sep 12 10:45:28 2009 +0000 +++ b/artifacts/src/main/java/de/intevation/artifacts/Artifact.java Sun Sep 13 14:50:53 2009 +0000 @@ -21,7 +21,7 @@ * <li>{@link #advance(Document, Object) advance()}: Advances this artifact * to the next internal state</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> + * <li>{@link #out(Document, OutputStream, CallContext) out()}: Produces output for this artifact.</li> * </ol> * * There are two more methods involved with the life cycle of the are: @@ -42,21 +42,21 @@ * Identify this artifact. * @return Returns unique string to identify this artifact globally. */ - public String identifier(); + String identifier(); /** * Internal hash of this artifact. * @return Returns hash that should stay the same if the internal * value has not changed. Useful for caching */ - public String hash(); + String hash(); /** * 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(Object context); + Document describe(CallContext context); /** * Change the internal state of the artifact. @@ -64,7 +64,7 @@ * @param target Target of internal state to move to. * @param context The global context of the runtime system. */ - public Document advance(Document target, Object context); + Document advance(Document target, CallContext context); /** * Feed data into this artifact. @@ -72,17 +72,17 @@ * @param context The global context of the runtime system. * @return An XML representation of the success of the feeding. */ - public Document feed(Document data, Object context); + Document feed(Document data, CallContext context); /** * Produce output from this artifact. * @param format Specifies the format of the output. * @param context The global context of the runtime system. */ - public void out( + void out( Document format, OutputStream out, - Object context) + CallContext context) throws IOException; /** @@ -92,7 +92,10 @@ * @param factory The factory which created this artifact. * @param context The global context of the runtime system. */ - public void setup(String identifier, ArtifactFactory factory, Object context); + public void setup( + String identifier, + ArtifactFactory factory, + Object context); /** * Called from artifact database when an artifact is