X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2Fcommands%2FInitCommand.java;h=874387437315e3060de784825993165c86f9dee3;hb=6c92dd9a72ae1fa27dd061c1897531879b8c0ba6;hp=ab2e5a1bbd423a63513a9f8c40c24ca254fde3f1;hpb=86f289cd42ba95846c80d22129ed565e4e9d6dde;p=mkjsf-moved-to-github.git diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/InitCommand.java b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/InitCommand.java index ab2e5a1..8743874 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/InitCommand.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/InitCommand.java @@ -6,7 +6,7 @@ import com.indexdata.mkjsf.pazpar2.commands.sp.InitCommandSp; import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand; /** - * Represents a Pazpar2 init command, can be accessed by pzreq.init + * init Pazpar2 command, referenced as: pzreq.init * * @author Niels Erik * @@ -74,13 +74,16 @@ public class InitCommand extends Pazpar2Command implements ServiceProxyCommand { for (String parameterName : parameters.keySet()) { newCommand.setParameterInState(parameters.get(parameterName).copy()); } - newCommand.spCommand = this.spCommand; + newCommand.spCommand = new InitCommandSp(this); + if (spCommand != null && spCommand.getUploadedInitDoc()!=null) { + newCommand.spCommand.setUploadedInitDoc(spCommand.getUploadedInitDoc()); + } return newCommand; } public ServiceProxyCommand getSp() { if (spCommand==null) { - spCommand = new InitCommandSp(this); + spCommand = new InitCommandSp(this); } return spCommand; }