Mercurial > dive4elements > gnv-client
changeset 614:e80e37b78302
Repaired broken step-back-history.
gnv-artifacts/trunk@684 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 12 Feb 2010 11:16:37 +0000 |
parents | f20b65c1ebf3 |
children | 01054ddccb0f |
files | gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java |
diffstat | 3 files changed, 16 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog Fri Feb 12 09:17:21 2010 +0000 +++ b/gnv-artifacts/ChangeLog Fri Feb 12 11:16:37 2010 +0000 @@ -1,3 +1,12 @@ +2010-02-12 Ingo Weinzierl <ingo.weinzierl@intevation.de> + + * src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java: Removed + useless method calls which removed elements from cache, because each state + puts its own elements into cache - not in one big piece. + + * src/main/java/de/intevation/gnv/state/StateBase.java: Adapted 'reset' + method. It removes the former user selection for this state, only. + 2010-02-12 Tim Englich <tim.englich@intevation.de> * doc/conf/products/timeseries/conf_mesh.xml:
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Fri Feb 12 09:17:21 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Fri Feb 12 11:16:37 2010 +0000 @@ -142,7 +142,7 @@ // no current state... if (current == null) { - log.debug("No current state. Advance not possible."); + log.warn("No current state. Advance not possible."); result = createReport( result, @@ -160,6 +160,7 @@ // step forward if (isStateCurrentlyReachable(targetState)) { + next = states.get(targetState); // 2. Transfer Results @@ -185,18 +186,15 @@ // step backward else if((next = getPreviousState(current, targetState)) != null) { - // reset input data - resetFutureStates(current, targetState); - - // remove data from future states from cache - resetDescribeData(current, identifier, targetState); - if (current != null) { current.endOfLife(context.globalContext()); } current = next; + // 2. Transfer Results + current.reset(identifier); + result = createReport( result, "result", "success", "Advance success" ); @@ -622,7 +620,7 @@ Iterator<Transition> transitions = this.transitions.iterator(); while (transitions.hasNext()) { Transition tmpTransition = transitions.next(); - if (tmpTransition.getFrom().equals(current.getID()) && + if (tmpTransition.getFrom().equals(current.getID()) && tmpTransition.isValid(this.current)){ Element currentNode = creator.create("state"); creator.addAttr(currentNode, "name", tmpTransition.getTo());
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java Fri Feb 12 09:17:21 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java Fri Feb 12 11:16:37 2010 +0000 @@ -132,10 +132,7 @@ public void reset(String uuid) { - - if (parent != null) { - inputData = parent.inputData(); - } + inputData.remove(dataName); }