Mercurial > dive4elements > framework
diff ChangeLog @ 58:39fec7d714dc
Added a real artifact proxy class to be more flexible with artifact replacements
in artifact databases.
artifacts/trunk@359 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 23 Nov 2009 11:15:44 +0000 |
parents | cf9848c85755 |
children | 8cd770330f1b |
line wrap: on
line diff
--- a/ChangeLog Fri Nov 13 18:37:51 2009 +0000 +++ b/ChangeLog Mon Nov 23 11:15:44 2009 +0000 @@ -1,3 +1,30 @@ +2009-11-23 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * artifacts/src/main/java/de/intevation/artifacts/CallContext.java: + Added a context dictionary accessible through putContextValue(key, value) + and getContextValue(key). Purpose is make artifact calls stackable and + transfer information through the call level transparently. + + * artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java: + Adjusted default implementation of CallContext. + + * artifact-database/src/main/java/de/intevation/artifactdatabase/ProxyArtifact.java: + New. A general proxy class for artifacts in artifact databases. This class uses + the extended call context semantics. + + The artifact calls (feed, describe, out, ...) are passed to a proxied artifact. + If the proxied artifact decides to be replaced by some other artifact it has to + to store a reference to the replacement artifact in the call context with + putContextValue(ProxyArtifact.REPLACE_PROXY, my_new_artifact). After the call + is finished the proxied object will change. This indirect callback mechanism is + used to minimize side effects. + + The identifier() call is not forwarded to the proxied artifact to have a stable id. + + Limitations: This mechanism does not let you build real matroska (multi level) + like artifact structures. This would only be possible if a kind of call context + stack is introduced. + 2009-11-13 Hans Plum <hans@intevation.de> RELEASE 0.2