Javadoc
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / pazpar2 / data / sp / SpResponseDataObject.java
1 package com.indexdata.mkjsf.pazpar2.data.sp;\r
2 \r
3 import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject;\r
4 \r
5 /**\r
6  * Base class for Service Proxy-only response data\r
7  * \r
8  * @author Niels Erik\r
9  *\r
10  */\r
11 public class SpResponseDataObject extends ResponseDataObject {\r
12 \r
13   private static final long serialVersionUID = -3098556883153269199L;  \r
14 \r
15   /**\r
16    * <p>Returns true if the command was not recognized by the Service Proxy,\r
17    * passed on to Pazpar2, and then also not recognized by Pazpar2.</p> \r
18    * <p>This results in an error no 3 from Pazpar2 which is passed back through \r
19    * the Service Proxy.</p> \r
20    * <p>This would normally be caused by issuing a Service Proxy-only command that \r
21    * the given Service Proxy is not configured for, or which the given \r
22    * Service Proxy has mapped to a different command name - in both cases it will \r
23    * just fall through.</p> \r
24    *  \r
25    * @return\r
26    */\r
27   public boolean unsupportedCommand() {\r
28     if (hasServiceError() \r
29         && getServiceError().getCode().equals("3")\r
30         && getServiceError().getValue().equals("command")) {        \r
31         return true;\r
32     }\r
33     return false;\r
34   }\r
35   \r
36 }\r