# HG changeset patch # User Ingo Weinzierl # Date 1311165057 0 # Node ID 694d818e99b20a61e5fcb35bd25c0cc03914a08d # Parent a8e009ebe13c20f5e9bc49c2542dec9db35f16a4 Adapted the signature of Artifact.setup() - a parameter of type CallMeta has been added. artifacts/trunk@2369 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r a8e009ebe13c -r 694d818e99b2 ChangeLog --- a/ChangeLog Tue Jul 19 06:59:19 2011 +0000 +++ b/ChangeLog Wed Jul 20 12:30:57 2011 +0000 @@ -1,3 +1,20 @@ +2011-07-20 Ingo Weinzierl + + * artifacts/src/main/java/de/intevation/artifacts/Artifact.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java: + Added a parameter of type CallMeta to the signature of setup(). The + CallMeta object is required for i18n initial things. + + !! NOTE: This modification breaks the current API !! + + * artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactFactory.java: + Call Artifact.setup() with an instance of CallMeta. + + * artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java: + The createArtifact() method got a CallMeta instance which is necessary + to call Artifact.setup(). + 2011-07-19 Ingo Weinzierl * artifact-database/src/main/java/de/intevation/artifactdatabase/state/Output.java, diff -r a8e009ebe13c -r 694d818e99b2 artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java Tue Jul 19 06:59:19 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java Wed Jul 20 12:30:57 2011 +0000 @@ -687,6 +687,7 @@ Artifact artifact = factory.createArtifact( backend.newIdentifier(), context, + callMeta, data); if (artifact == null) { diff -r a8e009ebe13c -r 694d818e99b2 artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java Tue Jul 19 06:59:19 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java Wed Jul 20 12:30:57 2011 +0000 @@ -13,6 +13,7 @@ import de.intevation.artifacts.Artifact; import de.intevation.artifacts.ArtifactFactory; import de.intevation.artifacts.CallContext; +import de.intevation.artifacts.CallMeta; import java.io.IOException; import java.io.OutputStream; @@ -113,7 +114,7 @@ } public void setup(String identifier, ArtifactFactory factory, - Object context, Document data) { + Object context, CallMeta callMeta, Document data) { if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.setup: " + identifier); } diff -r a8e009ebe13c -r 694d818e99b2 artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactFactory.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactFactory.java Tue Jul 19 06:59:19 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactFactory.java Wed Jul 20 12:30:57 2011 +0000 @@ -13,6 +13,7 @@ import de.intevation.artifacts.Artifact; import de.intevation.artifacts.ArtifactFactory; import de.intevation.artifacts.ArtifactSerializer; +import de.intevation.artifacts.CallMeta; import de.intevation.artifacts.GlobalContext; import org.apache.log4j.Logger; @@ -103,13 +104,14 @@ public Artifact createArtifact( String identifier, GlobalContext context, + CallMeta callMeta, Document data ) { try { Artifact artifact = (Artifact)artifactClass.newInstance(); - artifact.setup(identifier, this, context, data); + artifact.setup(identifier, this, context, callMeta, data); return artifact; } diff -r a8e009ebe13c -r 694d818e99b2 artifacts/src/main/java/de/intevation/artifacts/Artifact.java --- a/artifacts/src/main/java/de/intevation/artifacts/Artifact.java Tue Jul 19 06:59:19 2011 +0000 +++ b/artifacts/src/main/java/de/intevation/artifacts/Artifact.java Wed Jul 20 12:30:57 2011 +0000 @@ -131,6 +131,7 @@ String identifier, ArtifactFactory factory, Object context, + CallMeta callMeta, Document data); /** diff -r a8e009ebe13c -r 694d818e99b2 artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java --- a/artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java Tue Jul 19 06:59:19 2011 +0000 +++ b/artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java Wed Jul 20 12:30:57 2011 +0000 @@ -46,6 +46,7 @@ Artifact createArtifact( String identifier, GlobalContext context, + CallMeta callMeta, Document data); /**