Mercurial > dive4elements > framework
diff artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java @ 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 | 9a29899b31e5 |
children | 89e3de0ee05f |
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java Fri Nov 13 18:37:51 2009 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java Mon Nov 23 11:15:44 2009 +0000 @@ -54,6 +54,7 @@ protected PersistentArtifact artifact; protected int action; protected CallMeta callMeta; + protected HashMap customValues; public CallContextImpl( PersistentArtifact artifact, @@ -106,6 +107,19 @@ throw new IllegalStateException(INVALID_CALL_STATE); } } + + public Object getContextValue(Object key) { + return customValues != null + ? customValues.get(key) + : null; + } + + public Object putContextValue(Object key, Object value) { + if (customValues == null) { + customValues = new HashMap(); + } + return customValues.put(key, value); + } } // class CallContextImpl public class DeferredOutputImpl