From 8b6d5c5a8d1782bd95416d544d4750c90aa5655f Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Tue, 14 May 2013 14:50:21 -0400 Subject: [PATCH] Excludes auth info from state key. --- .../java/com/indexdata/mkjsf/pazpar2/state/Pazpar2State.java | 10 ++++++---- .../java/com/indexdata/mkjsf/pazpar2/state/StateManager.java | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/state/Pazpar2State.java b/src/main/java/com/indexdata/mkjsf/pazpar2/state/Pazpar2State.java index 13e3989..ca39330 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/state/Pazpar2State.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/state/Pazpar2State.java @@ -71,10 +71,12 @@ public class Pazpar2State { if (key == null) { StringBuilder querystatebuilder = new StringBuilder(""); for (Pazpar2Command command : commands.values()) { - if (command.hasParameters()) { - querystatebuilder.append("||"+command.getCommandName()+"::"); - querystatebuilder.append(command.getValueWithExpressions()); - } + if (! (command instanceof AuthCommand )) { + if (command.hasParameters()) { + querystatebuilder.append("||"+command.getCommandName()+"::"); + querystatebuilder.append(command.getValueWithExpressions()); + } + } } key = "#"+querystatebuilder.toString(); return key; diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/state/StateManager.java b/src/main/java/com/indexdata/mkjsf/pazpar2/state/StateManager.java index 5f5aaf4..d185559 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/state/StateManager.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/state/StateManager.java @@ -12,6 +12,7 @@ import javax.enterprise.context.SessionScoped; import org.apache.log4j.Logger; import com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command; +import com.indexdata.mkjsf.pazpar2.commands.sp.AuthCommand; import com.indexdata.mkjsf.utils.Utils; @SessionScoped -- 1.7.10.4