diff Changelog @ 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 251e8904d6c2
line wrap: on
line diff
--- a/Changelog	Sat Sep 12 10:45:28 2009 +0000
+++ b/Changelog	Sun Sep 13 14:50:53 2009 +0000
@@ -1,3 +1,73 @@
+2009-09-13	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	Refactored the persistent handling of the artifacts in the 
+	artifact database. When an artifact is called (describe, feed,
+	advance, out) a new CallContext is given instead of the
+	old Object context. CallContext.globalContext() returns the
+	old Object context now. CallContext.afterCall() may be
+	called from inside describe, feed, advance and out to tell
+	the artifact database what to do after the processing of
+	the specific call.
+	
+	The accepted values are:
+		- NOTHING    for doing nothing
+		- TOUCH      for just update the last access time
+		- STORE      for persisting the artifact.
+		- BACKGROUND to signal that the artifact has started
+		             a background operation.
+
+	After the background operation the artifact has to call
+	CallContext.fromBackground() to signal the artifact 
+	database that the artifact needs to be touched or stored.
+
+	!!! Without this call the artifact database assumes there
+	!!! is still some background operation on this artifact
+	!!! which prevents reclaiming resources
+
+	* artifacts/src/main/java/de/intevation/artifacts/CallContext.java:
+	New. New API to cope with background processing.
+
+	* artifacts/src/main/java/de/intevation/artifacts/Artifact.java:
+	Replaced old Object context with CallContext context.
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java:
+	Adjusted.
+
+	* artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java:
+	For a better encapsulation of the persistence operations of the
+	artifacts the database does not return artifacts any more. It delegates
+	the describe, feed, advance and out call to internal structures.
+
+	* artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabaseException.java:
+	New. Simplifies handling of error conditions inside of artifact database.
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java:
+	Adjusted to new interface. Internally it handles the background API.
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java,
+	artifact-database/src/main/java/de/intevation/artifactdatabase/rest/FactoriesResource.java,
+	artifact-database/src/main/java/de/intevation/artifactdatabase/rest/OutRepresentation.java,
+	artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.java,
+	artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java:
+	Adjusted to new artifact database interface (which greatly simplifies things)
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java:
+	Artifacts in background are not removed from database any longer.
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/App.java: Little
+	re-wirering need for new cleanup.
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java: 
+	Simplified to do the SQL stuff only. The most infrastructure stuff is now done
+	in ArtifactDatabaseImpl.
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/Id.java:
+	New. Helper base class to enable filtering of background artifacts by there
+	database id.
+
+	* artifact-database/src/main/resources/sql/org-h2-driver.properties:
+	Modified the INSERT statement to write the serialized artifact, too.
+
 2009-09-12	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* artifacts/src/main/java/de/intevation/artifacts/Artifact.java(out):

http://dive4elements.wald.intevation.org