Mercurial > dive4elements > gnv-client
changeset 736:b8c7105f2b94
Revoke Changes of r771 and override affected Methods in DefaultAutoResumeState
gnv-artifacts/trunk@774 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 15 Mar 2010 13:40:14 +0000 |
parents | d47901df0a14 |
children | 3f8f71e88587 |
files | gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/DefaultAutoResumeState.java gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java |
diffstat | 3 files changed, 35 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog Mon Mar 15 12:50:08 2010 +0000 +++ b/gnv-artifacts/ChangeLog Mon Mar 15 13:40:14 2010 +0000 @@ -1,3 +1,12 @@ +2010-03-15 Tim Englich <tim.englich@intevation.de> + + * src/main/java/de/intevation/gnv/state/StateBase.java, + src/main/java/de/intevation/gnv/state/DefaultAutoResumeState.java: + Revoke Changes of r771. The Switch if the QueryId is null has several + Effects which causes NPEs in other Parts of this Module. + So I removed the Changes of r771 and override the affected Methods in + DefaultAutoResumeState. + 2010-03-15 Tim Englich <tim.englich@intevation.de> * src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java:
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/DefaultAutoResumeState.java Mon Mar 15 12:50:08 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/DefaultAutoResumeState.java Mon Mar 15 13:40:14 2010 +0000 @@ -3,6 +3,12 @@ */ package de.intevation.gnv.state; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import de.intevation.gnv.geobackend.base.Result; + /** * @author Tim Englich <tim.englich@intevation.de> @@ -10,6 +16,8 @@ */ public class DefaultAutoResumeState extends StateBase implements AutoResumeState { + + /** * The UID of this Class. */ @@ -21,4 +29,19 @@ public DefaultAutoResumeState() { super(); } + + /** + * @see de.intevation.gnv.state.StateBase#purifyResult(java.util.Collection, java.lang.String) + */ + @Override + protected List<Object> purifyResult(Collection<Result> result, String uuid) { + return new ArrayList<Object>(0); + } + + @Override + protected String[] getDescriptionForInputData(InputData data, String uuid) { + return new String[0]; + } + + }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java Mon Mar 15 12:50:08 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java Mon Mar 15 13:40:14 2010 +0000 @@ -236,12 +236,8 @@ boolean valid = iv.isInputValid(tmpItem.getValue(), inputValue.getType()); if (valid) { - if (this.queryID != null){ - // Query the Description only if it is possible to - // Query data from the Database for this State. - String[] desc = getDescriptionForInputData(tmpItem, uuid); - tmpItem.setDescription(desc); - } + String[] desc = getDescriptionForInputData(tmpItem, uuid); + tmpItem.setDescription(desc); this.inputData.put(tmpItem.getName(), tmpItem); } else { String msg = resFactory.getRessource( @@ -287,7 +283,7 @@ } - private String[] getDescriptionForInputData(InputData data, String uuid) { + protected String[] getDescriptionForInputData(InputData data, String uuid) { // there is only one element in the list, so take the first Object obj = getDescibeData(uuid).get(0); List descs = new ArrayList();