1 package org.kuali.ole.sip2.constants;
2
3 import org.kuali.ole.OLEConstants;
4 import org.kuali.ole.sip2.service.OLENettyServer;
5 import org.kuali.rice.coreservice.api.CoreServiceApiServiceLocator;
6 import org.kuali.rice.coreservice.api.parameter.Parameter;
7 import org.kuali.rice.coreservice.api.parameter.ParameterKey;
8
9
10
11
12 public class OLESIP2Constants {
13
14 public static OLENettyServer olesip2Server = null;
15
16 public static final String NON_ROMAN_REGEX="[^\\w\\s\\-_,:\\(\\)\\[\\]\\/\\!]";
17 public static final String SIP2_FORMAT = "sip";
18 public static final String SIP_SERVICE = "sipService";
19 public static final String REQUEST_DATA = "requestData";
20 public static final String LOGIN_USER = "loginUser";
21 public static final String FAIL_TO_LOAD = "Failed to start Socket server";
22 public static final String SERVER_RUNNING = "Server Status: Socket Server is Running";
23 public static final String REFRESH_PAGE = "Already request is send by someone else to start server. Please wait for few seconds and refresh the page";
24 public static final String STARTED_SUCCESSFULLY = "Socket server started Successfully";
25 public static final String PROBLEM_WITH_SERVER = "Problem with starting Socket Server";
26 public static final String PARAMETER_MISSING = "Some parameters are missing from request";
27 public static final String SERVER_STOPPED = "Server Status: Socket Server Stopped";
28 public static final String SERVER_DOWN = "Server Status: Socket Server is Down";
29 public static final String INSTITUTION = getParameter("SIP2_INSTITUTION_NAME");
30 public static final String REQUEST_TYPE = getParameter("SIP2_REQUEST_TYPE");
31 public static final String OPERATOR_ID = getParameter("SIP2_OPERATOR_ID");
32 public static String ALREADY_REQUEST_PROCESSING = "N";
33 public static final String SIP2_DATE_FORMAT = "yyyyMMdd HHmmss";
34 public static final String SPLIT = "|";
35
36
37 public static final String SIP_VERSION = "2.00";
38
39 public static final String Y="Y";
40 public static final String N="N";
41
42 public static final String TIME_OUT_PERIOD="600";
43 public static final String RETRIES_ALLOWED="010";
44 public static final String ACS_SCREEN_MSG="System is Available";
45
46
47 public static final String PATRON_IDENTIFIER_CODE="AA";
48 public static final String ITEM_IDENTIFIER_CODE="AB";
49 public static final String TERMINAL_PWD_CODE="AC";
50 public static final String PATRON_PWD_CODE="AD";
51 public static final String PERSONAL_NAME_CODE="AE";
52 public static final String SCREEN_MSG_CODE="AF";
53 public static final String PRINT_LINE_CODE="AG";
54 public static final String DUE_DATE_CODE="AH";
55 public static final String TITLE_IDENTIFIER_CODE="AJ";
56 public static final String BLOCKED_CARD_MSG="AL";
57 public static final String LIBRARY_NAME_CODE="AN";
58 public static final String TERMINAL_LOCATION_CODE="AM";
59 public static final String INSTITUTION_ID_CODE="AO";
60 public static final String CURRENT_LOCATION_CODE="AP";
61 public static final String PERMANENT_LOCATION_CODE="AQ";
62 public static final String HOLE_ITEMS_CODE="AS";
63 public static final String OVERDUE_ITEMS_CODE="AT";
64 public static final String CHARGED_ITEMS_CODE="AU";
65 public static final String FINE_ITEMS_CODE="AV";
66 public static final String SEQUENCE_NUM_CODE="AY";
67 public static final String CHECKSUM_CODE="AZ";
68 public static final String HOME_ADDRESS_CODE="BD";
69 public static final String EMAIL_ADDRESS_CODE="BE";
70 public static final String HOME_PHONE_NUM_CODE="BF";
71 public static final String OWNER_CODE="BG";
72 public static final String CURRENCY_TYPE_CODE="BH";
73 public static final String CANCEL_CODE="BI";
74 public static final String TRANSACTION_ID_CODE="BK";
75 public static final String VALID_PATRON_CODE="BL";
76 public static final String RENEWED_ITEMS_CODE="BM";
77 public static final String UN_RENEWED_ITEMS_CODE="BN";
78 public static final String FEE_ACKNOWLEDGED_CODE="BO";
79 public static final String START_ITEM_CODE="BP";
80 public static final String END_ITEM_CODE="BQ";
81 public static final String QUEUE_POSITION_CODE="BR";
82 public static final String PICKUP_LOCATION_CODE="BS";
83 public static final String FEE_TYPE_CODE="BT";
84 public static final String RECALL_ITEMS_CODE="BU";
85 public static final String FEE_AMOUNT_CODE="BV";
86 public static final String EXPIRATION_DATE_CODE="BW";
87 public static final String SUPPORTED_MSG_CODE="BX";
88 public static final String HOLD_TYPE_CODE="BY";
89 public static final String HOLD_ITEMS_LIMIT_CODE="BZ";
90 public static final String OVERDUE_ITEMS_LIMIT_CODE="CA";
91 public static final String CHARGED_ITEMS_LIMIT_CODE="CB";
92 public static final String FEE_LIMIT_CODE="CC";
93 public static final String UN_AVA_HOLD_ITEMS_CODE="CD";
94 public static final String HOLD_QUEUE_LENGTH_CODE="CF";
95 public static final String FEE_IDENTIFIER_CODE="CG";
96 public static final String ITEM_PROPERTIES_CODE="CH";
97 public static final String SECURITY_INHIBIT_CODE="CI";
98 public static final String RECALL_DATE_CODE="CJ";
99 public static final String MEDIA_TYPE_CODE="CK";
100 public static final String SORT_BIN_CODE="CL";
101 public static final String HOLD_PICKUP_DATE_CODE="CM";
102 public static final String LOGIN_USER_ID_CODE="CN";
103 public static final String LOGIN_PWD_ID_CODE="CO";
104 public static final String LOCATION_CODE_SIP="CP";
105 public static final String VALID_PATRON_PWD="CQ";
106
107
108 public static final String PATRON_STATUS_REQUEST="23";
109 public static final String CHECKOUT_REQUEST="11";
110 public static final String CHECK_IN_REQUEST="09";
111 public static final String BLOCK_PATRON_REQUEST="01";
112 public static final String SC_STATUS_REQUEST="99";
113 public static final String ACS_REQUEST="97";
114 public static final String LOGIN_REQUEST="93";
115 public static final String PATRON_INFORMATION_REQUEST="63";
116 public static final String END_PATRON_SESSION_REQUEST="35";
117 public static final String FEE_PAID_REQUEST="37";
118 public static final String ITEM_INFORMATION_REQUEST="17";
119 public static final String ITEM_STATUS_UPDATE_REQUEST="19";
120 public static final String PATRON_ENABLE_REQUEST="25";
121 public static final String HOLD_REQUEST="15";
122 public static final String RENEW_REQUEST="29";
123 public static final String RENEW_ALL_REQUEST="65";
124
125
126 public static final String PATRON_STATUS_RESPONSE="24";
127 public static final String CHECKOUT_RESPONSE="12";
128 public static final String CHECK_IN_RESPONSE="10";
129 public static final String ACS_STATUS_RESPONSE="98";
130 public static final String SC_RESEND_RESPONSE="96";
131 public static final String LOGIN_RESPONSE="94";
132 public static final String PATRON_INFORMATION_RESPONSE="64";
133 public static final String END_PATRON_SESSION_RESPONSE="36";
134 public static final String FEE_PAID_RESPONSE="38";
135 public static final String ITEM_INFORMATION_RESPONSE="18";
136 public static final String ITEM_STATUS_UPDATE_RESPONSE="20";
137 public static final String PATRON_ENABLE_RESPONSE="26";
138 public static final String HOLD_RESPONSE="16";
139 public static final String RENEW_RESPONSE="30";
140 public static final String RENEW_ALL_RESPONSE="66";
141
142
143 public static final String ADD_HOLD="add";
144 public static final String DELETE_HOLD="delete";
145 public static final String UPDATE_HOLD="updateHold";
146
147 public static final String CHECK_IN_SUCCESS="SuccessFully Checked-in";
148 public static final String RENEW_SUCCESS="Item successFully renewed";
149 public static final String CHECK_OUT_SUCCESS="Successfully loaned";
150 public static final String CHECK_OUT_SUCCESSFULLY="Item Successfully loaned";
151 public static final String CHECK_OUT_FAILED="Item cannot be loaned : any query see help desk";
152 public static final String PATRON_SESSION_END="Patron Session Ended Successfully";
153 public static final String FEE_PAID="Successfully Paid the Amount";
154 public static final String SERVICE_ERROR="Cannot Able to process this service";
155 public static final String REQUEST_RAISED="Request Raised Succesfully";
156 public static final String SUCCESSFULLY="Succesfully";
157 public static final String SERVICE_UNAVAILABLE="Update Hold Request Service Currently Not Available in OLE";
158 public static final String ITEM_UNAVAILABLE="Item is Not Available";
159 public static final String ITEM_SERVICE_NOT_SUPPORTED="Item Status Update Service - Not supported in OLE";
160 public static final String PATRON_ENABLED="Patron Enabled successfully";
161 public static final String YES="YES";
162 public static final String ONHOLD="ONHOLD";
163 public static final String REQUEST_PROCESSED="Requested process completed successfully.";
164
165 public static String getParameter(String name) {
166 ParameterKey parameterKey = ParameterKey.create(OLEConstants.APPL_ID, OLEConstants.DLVR_NMSPC, OLEConstants.DLVR_CMPNT,name);
167 Parameter parameter = CoreServiceApiServiceLocator.getParameterRepositoryService().getParameter(parameterKey);
168 if(parameter==null){
169 parameterKey = ParameterKey.create(OLEConstants.APPL_ID_OLE, OLEConstants.DLVR_NMSPC, OLEConstants.DLVR_CMPNT,name);
170 parameter = CoreServiceApiServiceLocator.getParameterRepositoryService().getParameter(parameterKey);
171 }
172 return parameter!=null?parameter.getValue():null;
173 }
174 }