X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fpz2utils4jsf%2Fpazpar2%2Fsp%2FServiceProxySession.java;h=2a58af0034a8e3c06d83d4c284c4b167fa2c6de2;hb=33338bd223ec711264392b7768d89d0f3fbce677;hp=27d7908d9b6f52a555b4716415909bc8abaeb955;hpb=a78346a10c75cd39bd0009517aebabc73871e2c3;p=mkjsf-moved-to-github.git diff --git a/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/sp/ServiceProxySession.java b/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/sp/ServiceProxySession.java index 27d7908..2a58af0 100644 --- a/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/sp/ServiceProxySession.java +++ b/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/sp/ServiceProxySession.java @@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException; import org.apache.log4j.Logger; +import com.indexdata.pz2utils4jsf.pazpar2.CommandParameter; import com.indexdata.pz2utils4jsf.pazpar2.Pz2Session; import com.indexdata.pz2utils4jsf.pazpar2.sp.auth.ServiceProxyUser; import com.indexdata.pz2utils4jsf.utils.Utils; @@ -15,8 +16,8 @@ public class ServiceProxySession extends Pz2Session implements ServiceProxyInter private static final long serialVersionUID = -5770410029361522854L; private static Logger logger = Logger.getLogger(ServiceProxySession.class); private String initDocFileName = ""; - private String initDocResponse = ""; - + private String initDocResponse = ""; + public ServiceProxySession() { logger.info("Instantiating pz2 session object [" + Utils.objectId(this) + "]"); } @@ -46,10 +47,11 @@ public class ServiceProxySession extends Pz2Session implements ServiceProxyInter } @Override - public String postInit() throws UnsupportedEncodingException, IOException { + public String postInit() throws UnsupportedEncodingException, IOException { String initDocPath = client().getInitDocPaths()[0]; logger.info("Paths: " + client().getInitDocPaths()); logger.info("Path: " + initDocPath); + this.resetDataObjects(); byte[] response = client().postInitDoc(initDocPath + getInitFileName()); initDocResponse = new String(response,"UTF-8"); return initDocResponse; @@ -66,7 +68,7 @@ public class ServiceProxySession extends Pz2Session implements ServiceProxyInter return client().getServiceProxyUrl(); } - private ServiceProxyClient client () { + public ServiceProxyClient client () { return (ServiceProxyClient)searchClient; } @@ -75,6 +77,12 @@ public class ServiceProxySession extends Pz2Session implements ServiceProxyInter return initDocResponse; } + public void setAceFilter(String filterExpression) { + setCommandParameter("record",new CommandParameter("acefilter","=",filterExpression)); + } + + public String getAceFilter () { + return getCommandParameterValue("record","acefilter",""); + } - }