X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2Fdata%2Fsp%2FSpResponseDataObject.java;fp=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2Fdata%2Fsp%2FSpResponseDataObject.java;h=78167766b952377232f29c6964457a88a96d1b15;hb=cd63f324cf98a553f9cea33c50b0d68985552a8d;hp=0000000000000000000000000000000000000000;hpb=0bd75b32a504b9e04c4ebc901b075a2be89ee359;p=mkjsf-moved-to-github.git diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/data/sp/SpResponseDataObject.java b/src/main/java/com/indexdata/mkjsf/pazpar2/data/sp/SpResponseDataObject.java new file mode 100644 index 0000000..7816776 --- /dev/null +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/data/sp/SpResponseDataObject.java @@ -0,0 +1,36 @@ +package com.indexdata.mkjsf.pazpar2.data.sp; + +import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject; + +/** + * Base class for Service Proxy-only response data + * + * @author Niels Erik + * + */ +public class SpResponseDataObject extends ResponseDataObject { + + private static final long serialVersionUID = -3098556883153269199L; + + /** + *

Returns true if the command was not recognized by the Service Proxy, + * passed on to Pazpar2, and then also not recognized by Pazpar2.

+ *

This results in an error no 3 from Pazpar2 which is passed back through + * the Service Proxy.

+ *

This would normally be caused by issuing a Service Proxy-only command that + * the given Service Proxy is not configured for, or which the given + * Service Proxy has mapped to a different command name - in both cases it will + * just fall through.

+ * + * @return + */ + public boolean unsupportedCommand() { + if (hasServiceError() + && getServiceError().getCode().equals("3") + && getServiceError().getValue().equals("command")) { + return true; + } + return false; + } + +}