Mercurial > dive4elements > framework
changeset 297:694d818e99b2
Adapted the signature of Artifact.setup() - a parameter of type CallMeta has been added.
artifacts/trunk@2369 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 20 Jul 2011 12:30:57 +0000 |
parents | a8e009ebe13c |
children | a5e6d1923c95 |
files | ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactFactory.java artifacts/src/main/java/de/intevation/artifacts/Artifact.java artifacts/src/main/java/de/intevation/artifacts/ArtifactFactory.java |
diffstat | 6 files changed, 25 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ingo@intevation.de> + + * 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 <ingo@intevation.de> * artifact-database/src/main/java/de/intevation/artifactdatabase/state/Output.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) {
--- 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); }
--- 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; }
--- 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); /**
--- 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); /**