Mercurial > dive4elements > river
changeset 1145:b33a350d79db
Append an attribute 'background-processing' (can be 'true' or 'false') to the WINFOArtifact's DESCRIBE document.
flys-artifacts/trunk@2668 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 07 Sep 2011 13:56:10 +0000 |
parents | c07e9e9c7482 |
children | 66d98964f2df |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java |
diffstat | 2 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Sep 07 13:54:18 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Sep 07 13:56:10 2011 +0000 @@ -1,3 +1,10 @@ +2011-09-07 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: Appended + a new attribute 'background-processing' to the DESCRIBE of this + Artifact. Its value is 'true' if this Artifact has started a background + thread which has not finished yet - otherwise it is 'false. + 2011-09-07 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java Wed Sep 07 13:54:18 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java Wed Sep 07 13:56:10 2011 +0000 @@ -18,6 +18,7 @@ import de.intevation.artifacts.common.ArtifactNamespaceContext; import de.intevation.artifacts.common.utils.XMLUtils; +import de.intevation.artifacts.common.utils.XMLUtils.ElementCreator; import de.intevation.flys.artifacts.context.FLYSContext; @@ -137,6 +138,8 @@ ProtocolUtils.appendState(creator, root, current); ProtocolUtils.appendReachableStates(creator, root, reachable); + appendBackgroundActivity(creator, root, context); + Element name = ProtocolUtils.createArtNode( creator, "name", new String[] { "value" }, @@ -185,6 +188,23 @@ } + protected void appendBackgroundActivity( + ElementCreator cr, + Element root, + CallContext context + ) { + Element inBackground = cr.create("background-processing"); + + cr.addAttr( + inBackground, + "value", + String.valueOf(context.isInBackground()), + true); + + root.appendChild(inBackground); + } + + protected void appendOutputModes( Document doc, Element outs,