Mercurial > dive4elements > river
changeset 952:7399401f728c
Adapted the method of FLYSArtifact.setup() which has been changed in the artifact package.
flys-artifacts/trunk@2370 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 20 Jul 2011 12:34:20 +0000 |
parents | 9686e1132a81 |
children | 6f8873fca927 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java |
diffstat | 4 files changed, 25 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Jul 20 10:39:27 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Jul 20 12:34:20 2011 +0000 @@ -1,3 +1,13 @@ +2011-07-20 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: Adapted + the signature of setup() which requires a CallMeta parameter now. + + * src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java, + src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java: Use + the CallMeta object retrieved in setup() to call initialize(). It is now + able to i18n things. + 2011-07-20 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/artifacts/services/meta/App.java: New.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Wed Jul 20 10:39:27 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Wed Jul 20 12:34:20 2011 +0000 @@ -28,6 +28,7 @@ import de.intevation.artifacts.ArtifactDatabaseException; import de.intevation.artifacts.ArtifactFactory; import de.intevation.artifacts.CallContext; +import de.intevation.artifacts.CallMeta; import de.intevation.artifacts.common.ArtifactNamespaceContext; import de.intevation.artifacts.common.utils.XMLUtils; @@ -161,11 +162,12 @@ String identifier, ArtifactFactory factory, Object context, + CallMeta callMeta, Document data) { logger.debug("Setup this artifact with the uuid: " + identifier); - super.setup(identifier, factory, context, data); + super.setup(identifier, factory, context, callMeta, data); FLYSContext flysContext = (FLYSContext) context; StateEngine engine = (StateEngine) flysContext.get( @@ -188,7 +190,7 @@ ArtifactDatabaseImpl.GLOBAL_CONTEXT_KEY); try { - initialize(db.getRawArtifact(model), context); + initialize(db.getRawArtifact(model), context, callMeta); } catch (ArtifactDatabaseException adbe) { logger.error(adbe, adbe); @@ -197,7 +199,11 @@ } - protected void initialize(Artifact artifact, Object context) { + protected void initialize( + Artifact artifact, + Object context, + CallMeta callMeta) + { // do nothing here }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java Wed Jul 20 10:39:27 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java Wed Jul 20 12:34:20 2011 +0000 @@ -6,6 +6,7 @@ import org.apache.log4j.Logger; import de.intevation.artifacts.Artifact; +import de.intevation.artifacts.CallMeta; import de.intevation.artifactdatabase.state.Facet; @@ -28,7 +29,7 @@ @Override - protected void initialize(Artifact artifact, Object context) { + protected void initialize(Artifact artifact, Object context, CallMeta meta) { logger.debug("Initialize internal state with: "+ artifact.identifier()); FLYSArtifact flys = (FLYSArtifact) artifact; @@ -38,7 +39,7 @@ // TODO Add CallMeta DefaultState state = (DefaultState) getCurrentState(context); - state.computeInit(this, hash(), null, fs); + state.computeInit(this, hash(), meta, fs); if (!fs.isEmpty()) { facets.put(getCurrentStateId(), fs);
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java Wed Jul 20 10:39:27 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java Wed Jul 20 12:34:20 2011 +0000 @@ -6,6 +6,7 @@ import org.apache.log4j.Logger; import de.intevation.artifacts.Artifact; +import de.intevation.artifacts.CallMeta; import de.intevation.artifactdatabase.state.Facet; @@ -28,14 +29,14 @@ @Override - protected void initialize(Artifact artifact, Object context) { + protected void initialize(Artifact artifact, Object context, CallMeta meta) { logger.debug("Initialize internal state with: "+ artifact.identifier()); List<Facet> fs = new ArrayList<Facet>(); // TODO Add CallMeta DefaultState state = (DefaultState) getCurrentState(context); - state.computeInit(this, hash(), null, fs); + state.computeInit(this, hash(), meta, fs); if (!fs.isEmpty()) { facets.put(getCurrentStateId(), fs);