View Javadoc
1   /*
2    * Copyright 2011 The Kuali Foundation.
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.select;
17  
18  import java.math.BigDecimal;
19  import java.util.*;
20  
21  public class OleSelectConstant {
22  
23      public static final String CITATION = "CITATION";
24      public static final String OPENURL = "OPENURL";
25      public static final String FORM = "FORM";
26  
27      // added for jira - OLE-2203
28      public static final String USD = "US Dollar";
29      public static final String FILENAME = "filename";
30      public static final String FILEPATH = "filePath";
31      public static final String XML_FILE_TYPE_EXTENSION = ".xml";
32      public static final String XML_FILE_CONTENT = "xmlFileContent";
33      public static final String IS_BIB_EDIT = "isBibEdit";
34      public static final String BIBMARCXML_DIR = "ole.bibmarcxml.directory";
35  
36      public static final String SOAP_SUCCESS = "Document created successfully";
37      public static final String SOAP_EXCEPTION = "Failure of document creation";
38  
39      public static final String STATUS = "true";
40  
41      public static final String SOAP_INVALID_OPENURL = "Failure of document creation: Invalid Open URL";
42      public static final String SOAP_CITATION_PARSER_UNREACHABLE = "Failure of document creation: Unable to connect to parser";
43  
44      public static final String REQUESTOR_TYPE_STAFF = "STAFF";
45      public static final String REQUESTOR_TYPE_BATCHINGEST = "BATCHINGEST";
46      public static final String REQUESTOR_TYPE = "requestorType";
47      public static final String REQUESTOR_TYPE_ID = "requestorTypeId";
48  
49      public static final String SYSTEM_USER_ROLE_NAME = "System User";
50  
51      public static final String DEFAULT_VALUE_SYSTEM = "System";
52      public static final String DEFAULT_VALUE_ROLE = "Role";
53      public static final String DEFAULT_VALUE_USER = "User";
54  
55      public static final String REQUEST_SRC_TYPE_BATCHINGEST = "BatchIngest";
56      public static final String REQUEST_SRC_TYPE_STAFF = "Staff";
57      public static final String REQUEST_SRC_TYPE_WEBFORM = "WebForm";
58  
59      public static final String REQUISITON_SRC_TYPE_AUTOINGEST = "AUTO";
60      public static final String REQUISITON_SRC_TYPE_B2B = "B2B";
61      public static final String REQUISITON_SRC_TYPE_LEGACY = "LGCY";
62      public static final String REQUISITON_SRC_TYPE_MANUALINGEST = "MAN";
63      public static final String REQUISITON_SRC_TYPE_DIRECTINPUT = "STAN";
64      public static final String REQUISITON_SRC_TYPE_WEBFORM = "WEB";
65  
66      public static final String DOCSTORE_OPERATION_BATCHINGEST = "BATCHINGEST";
67      public static final String DOCSTORE_OPERATION_INGEST = "ingest";
68      public static final String DOCSTORE_OPERATION_STAFF = "STAFF";
69      public static final String DOCSTORE_OPERATION_WEBFORM = "WEBFORM";
70  
71      /* Starts here **** Added for creation of request xml which is used to ingest the record in document store *****/
72      public static final String DOCSTORE_CATEGORY_BIB = "bibliographic";
73      public static final String DOCSTORE_CATEGORY_WORK = "work";
74      public static final String DOCSTORE_TYPE_BIB = "bibliographic";
75      public static final String DOCSTORE_TYPE_ITEM = "item";
76      public static final String DOCSTORE_TYPE_INSTANCE = "instance";
77      public static final String DOCSTORE_FORMAT_MARC = "marc";
78      public static final String DOCSTORE_FORMAT_OLEML = "oleml";
79  
80      public static final String BIB_MARC_XMLSTRING = "bibMarcXMLString";
81      public static final String ITEM_MARC_XMLSTRING = "itemMarcXMLString";
82      public static final String INSTANCE_MARC_XMLSTRING = "instanceMarcXMLString";
83  
84      public static final String DOCSTORE_REQUEST_XMLSTRING = "docStoreRequestXMLString";
85  
86      public static final String CDATA_START_TAG = "<![CDATA[";
87      public static final String CDATA_END_TAG = "]]>";
88      /* Ends here **** Added for creation of request xml which is used to ingest the record in document store *****/
89  
90      public static final String ITEM_TYPE_CODE_ITEM = "ITEM";
91  
92      public static final String CURRENCY_TYPE_ID = "currencyTypeId";
93      public static final String CURRENCY_TYPE_NAME = "US Dollar";
94      public static final String VENDOR_HEADER_GENERATED_ID = "vendorHeaderGeneratedIdentifier";
95      public static final String EXCHANGE_RATE_DATE = "exchangeRateDate";
96      public static final String DISCOUNT_TYPE_PERCENTAGE = "%";
97      public static final String DISCOUNT_TYPE_DOLLOR = "#";
98      public static final String TITLE_ID = "titleId";
99      public static final String INSTANCE_ID = "instanceId";
100     public static final String DOC_CATEGORY_TYPE = "docCategoryType";
101     public static final String DOC_CATEGORY_TYPE_BIBLINKS = "BibligraphicLinks";
102     public static final String DOC_CATEGORY_TYPE_ITEMLINKS = "bibIdentifier";
103     public static final String DOC_CATEGORY_TYPE_BIB = "bibliographic";
104     public static final String DOC_CATEGORY_TYPE_ITEM = "item";
105     public static final String DOC_CATEGORY_TYPE_INSTANCE = "bibIdentifier";
106 
107     public static final String BATCHINGEST_REQUEST = "BATCHINGEST";
108     public static final String STAFF_REQUEST = "Library Material";
109     public static final String WEBFORM_REQUEST = "WebformRequest";
110 
111     public static final String ITEM_SRC_TYPE_PUBLISHER = "Publisher";
112 
113     public static final String DEFAULT_VALUE_USERID = "userId";
114 
115     public static final String DEFAULT_VALUE_FOR = "defaultValueFor";
116 
117     public static final String DEFAULT_VALUE_ROLE_ID = "roleId";
118 
119     public static final String VENDOR_TRANSMISSION_FORMAT_EDI = "EDI";
120 
121     public static final String VENDOR_TRANSMISSION_FORMAT_PDF = "PDF";
122 
123     public static final String METHOD_OF_PO_TRANSMISSION_NOPR = "NOPR";
124 
125     public static final String DEFAULT_TABLE_COLUMN_DOCUMENTTYPE = "documentType";
126     public static final String CLOSED="Closed";
127 
128 
129     // added for OLE-2144 start
130     public static final class DocStoreDetails {
131         public static final String TITLE_KEY = "title";
132         public static final String ISBN_KEY = "isbn";
133         public static final String AUTHOR_KEY = "author";
134         public static final String PUBLISHER_KEY = "publisher";
135         public static final String PUBLICATIONDATE_KEY = "publicationDate";
136         public static final String ITEMLINKS_KEY = "bibIdentifier";
137         public static final String LOCAL_ID = "localIdentifier";
138 
139         public static final String TITLE_VALUE = "Title_search";
140         public static final String AUTHOR_VALUE = "Author_search";
141         public static final String ISBN_VALUE = "ISBN_display";
142         public static final String PUBLISHER_VALUE = "Publisher_search";
143         public static final String PUBLICATIONDATE_VALUE = "YearOfPublication";
144         public static final String ITEMLINKS_VALUE = "bibIdentifier";
145         public static final String LOC_ID_VALUE = "LocalId_search";
146 
147         public static final Map<String, String> getDocstoreQueryKeys() {
148             Map<String, String> docStoreQueryKeys = new HashMap<String, String>();
149             docStoreQueryKeys.put(TITLE_KEY, TITLE_VALUE);
150             docStoreQueryKeys.put(AUTHOR_KEY, AUTHOR_VALUE);
151             docStoreQueryKeys.put(ISBN_KEY, ISBN_VALUE);
152             docStoreQueryKeys.put(PUBLISHER_KEY, PUBLISHER_VALUE);
153             docStoreQueryKeys.put(LOCAL_ID, LOC_ID_VALUE);
154             docStoreQueryKeys.put(PUBLICATIONDATE_KEY, PUBLICATIONDATE_VALUE);
155             docStoreQueryKeys.put(ITEMLINKS_KEY, ITEMLINKS_VALUE);
156             return Collections.unmodifiableMap(docStoreQueryKeys);
157         }
158 
159         public static final Map<String, String> DOCSTORE_QUERY_KEYS = getDocstoreQueryKeys();
160     }
161 
162     public static final String RECEIVING_QUEUE_SEARCH = "receivingQueuePo";
163     public static final String FROM_DATE_CREATED = "fromDateCreated";
164     public static final String TO_DATE_CREATED = "toDateCreated";
165     public static final String PURCHASEORDER_STATUS_OPEN = "OPEN";
166     public static final String ISBN = "isbn";
167 
168     // added for OLE-2144 end
169 
170     //AcquisitionSearch
171     public static final String PURCHASING_DOC_SEARCH = "Document Search";
172     public static final String BIB_SEARCH = "Bib Search";
173 
174     public static class InvoiceSearch {
175         public static final String PO_ID = "purchaseOrderIdentifier";
176         public static final String PURAP_ID = "purapDocumentIdentifier";
177         public static final String INV_NUMBER = "invoiceNumber";
178         public static final String INV_ACCOUNT = "accountNumber";
179         public static final String INV_CHART = "chartOfAccountsCode";
180         public static final String INV_ORG = "organizationCode";
181         public static final String INV_PAY_DATE="invoicePayDate";
182         public static final String INV_TYP="invoiceType";
183         public static final String INV_TYP_ID="invoiceTypeId";
184         public static final String INV_DOC_NUM="documentNumber";
185         public static final String INV_DATE="invoiceDate";
186         public static final String INV_SUB_TYP="invoiceSubType";
187         public static final String INV_SUB_TYP_ID="invoiceSubTypeId";
188         public static final String INV_VND_NM="vendorName";
189         public static final String INV_VND_NUM="vendorNumber";
190         public static final String ITEM_TITLE_ID = "itemTitleId";
191         public static final String PO_DOC_NUMS = "purchaseOrderDocumentNums";
192         public static final String PO_DIS_INV_DT = "searchResultInvoiceDate";
193         public static final String PO_DIS_INV_PAY_DT = "searchResultInvoicePayDate";
194         public static final String ORG_DOC_NUMBER = "organizationDocumentNumber";
195 
196     }
197     public static class AcquisitionsSearch {
198         public static final String PO_ID = "purchaseOrderIdentifier";
199         public static final String ITEM_TITLE_ID = "itemTitleId";
200         public static final String ITEM_LOCAL_TITLE_ID = "localTitleId";
201         public static final String DONOR_CODES = "donorSearchCodes";
202         public static final String TITLE_ID = "titleId";
203         public static final String searchType = "searchType";
204         public static final String REQUISITIONS = "requisitions";
205         public static final String CREATED_FROM = "dateFrom";
206         public static final String CREATED_TO = "dateTo";
207         public static final String ACQ_PO_NUMBER = "purapDocumentIdentifier";
208         public static final String ACQ_ACCOUNT = "accountNumber";
209         public static final String ACQ_CHART = "chartOfAccountsCode";
210         public static final String ACQ_ORG = "organizationCode";
211         public static final String INITIATOR = "initiator";
212         public static final String REQUESTOR = "requestorName";
213         public static final String ACQ_VND_NAME = "vendorName";
214         public static final String ACQ_INT_REQID = "internalRequestorId";
215         public static final String ACQ_EXT_REQID = "externalRequestorId";
216         public static final String ACQ_TITLE = "title";
217         public static final String ACQ_AUTHOR = "author";
218         public static final String ACQ_PUBLISHER = "publisher";
219         public static final String ACQ_ISBN = "isbn";
220         public static final String ACQ_LOCAL_ID = "localIdentifier";
221         public static final String ACQ_DOC_NUMBER = "documentNumber";
222         public static final String APP_DOC_STATUS = "applicationDocumentStatus";
223         public static final String APP_DOC_DESC = "documentDescription";
224         public static final String APP_DOC_TYPE_CODE = "financialDocumentTypeCode";
225         public static final String APP_DOC_NUM = "organizationDocumentNumber";
226 
227         public static final String ITM_EXT_REQID = "requestorId";
228 
229         public static final String DOCUMENT_TYPE_NAME = "docTypeFullName";
230         public static final String documentType = "documentType";
231 
232         public static final Map<String, String> getRequisitionFieldNames() {
233             Map<String, String> requisitionFields = new HashMap<String, String>();
234             requisitionFields.put(ACQ_PO_NUMBER, ACQ_PO_NUMBER);
235             requisitionFields.put(ACQ_VND_NAME, ACQ_VND_NAME);
236             requisitionFields.put(ACQ_INT_REQID, ACQ_INT_REQID);
237             requisitionFields.put(ACQ_EXT_REQID, ITM_EXT_REQID);
238             requisitionFields.put(ACQ_ACCOUNT, ACQ_ACCOUNT);
239             requisitionFields.put(ACQ_CHART, ACQ_CHART);
240             requisitionFields.put(ACQ_ORG, ACQ_ORG);
241             return Collections.unmodifiableMap(requisitionFields);
242         }
243 
244         public static final Map<String, String> getPurchaseOrderNames() {
245             Map<String, String> purchaseOrderFields = new HashMap<String, String>();
246             purchaseOrderFields.put(ACQ_PO_NUMBER, ACQ_PO_NUMBER);
247             purchaseOrderFields.put(ACQ_VND_NAME, ACQ_VND_NAME);
248             purchaseOrderFields.put(ACQ_INT_REQID, ACQ_INT_REQID);
249             purchaseOrderFields.put(ACQ_EXT_REQID, ITM_EXT_REQID);
250             purchaseOrderFields.put(ACQ_ACCOUNT, ACQ_ACCOUNT);
251             purchaseOrderFields.put(ACQ_CHART, ACQ_CHART);
252             purchaseOrderFields.put(ACQ_ORG, ACQ_ORG);
253             return Collections.unmodifiableMap(purchaseOrderFields);
254         }
255 
256         public static final Map<String, String> getLineItemReceivingNames() {
257             Map<String, String> lineItemReceivingFields = new HashMap<String, String>();
258             lineItemReceivingFields.put(ACQ_PO_NUMBER, PO_ID);
259             lineItemReceivingFields.put(ACQ_VND_NAME, ACQ_VND_NAME);
260             return Collections.unmodifiableMap(lineItemReceivingFields);
261         }
262 
263         public static final Map<String, String> getCorrectionReceivingNames() {
264             Map<String, String> correctionReceivingFields = new HashMap<String, String>();
265             correctionReceivingFields.put(ACQ_PO_NUMBER, PO_ID);
266             return Collections.unmodifiableMap(correctionReceivingFields);
267         }
268 
269         public static final Map<String, String> getPaymentRequestNames() {
270             Map<String, String> paymentRequestFields = new HashMap<String, String>();
271             paymentRequestFields.put(ACQ_PO_NUMBER, ACQ_PO_NUMBER);
272             paymentRequestFields.put(ACQ_VND_NAME, ACQ_VND_NAME);
273             paymentRequestFields.put(ACQ_ACCOUNT, ACQ_ACCOUNT);
274             paymentRequestFields.put(ACQ_CHART, ACQ_CHART);
275             paymentRequestFields.put(ACQ_ORG, ACQ_ORG);
276             return Collections.unmodifiableMap(paymentRequestFields);
277         }
278 
279         public static final Map<String, String> getDocStoreDetails() {
280             Map<String, String> docStoreFields = new HashMap<String, String>();
281             docStoreFields.put(ACQ_TITLE, ACQ_TITLE);
282             docStoreFields.put(ACQ_AUTHOR, ACQ_AUTHOR);
283             docStoreFields.put(ACQ_PUBLISHER, ACQ_PUBLISHER);
284             docStoreFields.put(ACQ_LOCAL_ID, ACQ_LOCAL_ID);
285             docStoreFields.put(ACQ_ISBN, ACQ_ISBN);
286             return Collections.unmodifiableMap(docStoreFields);
287         }
288 
289         public static final List<String> getResultNames() {
290             List<String> resultFields = new ArrayList<String>();
291             resultFields.add(APP_DOC_NUM);
292             resultFields.add(APP_DOC_TYPE_CODE);
293             resultFields.add(APP_DOC_DESC);
294             //resultFields.add(APP_DOC_STATUS);
295             resultFields.add(ACQ_PO_NUMBER);
296             resultFields.add(ITEM_TITLE_ID);
297             resultFields.add(PO_ID);
298             return Collections.unmodifiableList(resultFields);
299         }
300         public static final Map<String, String> getInvoiceNames() {
301             Map<String, String> invoiceFields = new HashMap<String, String>();
302             invoiceFields.put(ACQ_VND_NAME, ACQ_VND_NAME);
303             invoiceFields.put(ACQ_PO_NUMBER, ACQ_PO_NUMBER);
304             invoiceFields.put(ACQ_VND_NAME, ACQ_VND_NAME);
305             invoiceFields.put(ACQ_ACCOUNT, ACQ_ACCOUNT);
306             invoiceFields.put(ACQ_CHART, ACQ_CHART);
307             invoiceFields.put(ACQ_ORG, ACQ_ORG);
308             return Collections.unmodifiableMap(invoiceFields);
309         }
310 
311         public static final Map<String, String> REQUISITION_FIELDS = getRequisitionFieldNames();
312         public static final Map<String, String> PURCHASEORDER_FIELDS = getPurchaseOrderNames();
313         public static final Map<String, String> LINE_ITEM_RECEIVING_FIELDS = getLineItemReceivingNames();
314         public static final Map<String, String> CORRECTION_RECEIVING_FIELDS = getCorrectionReceivingNames();
315         public static final Map<String, String> PAYMENT_FIELDS = getPaymentRequestNames();
316         public static final Map<String, String> DOC_STORE_FIELDS = getDocStoreDetails();
317         public static final List<String> RESULT_FIELDS = getResultNames();
318         public static final Map<String, String> INVOICE_FIELDS = getInvoiceNames();
319 
320     }
321 
322     //Invoice Section Ids
323     public static final String PROCESS_ITEM_SECTION_ID = "OLEInvoiceView-processItems";
324     public static final String INVOICE_INFO_SECTION_ID = "OLEInvoiceView-invoiceInfo";
325     public static final String INVOICE_ITEM_SECTION_ID = "OleInvoiceView-invoiceItems";
326     public static final String INVOICE_ADDITIONAL_ITEM_SECTION_ID="OLEInvoiceView-ProcessItem-AdditionalCharges";
327     public static final String INVOICE_ADDITIONAL_CHARGE_SECTION_ID="OLEInvoiceView-AdditionalCharges-additionalItems";
328     //Added for Payment Request Validation
329     public static final String FOREIGN_VENDOR_INVOICE_AMOUNT = "foreignVendorInvoiceAmount";
330     public static final String FOREIGN_VENDOR_INVOICE_AMOUNT_STRING = "Foreign Vendor Invoice Amount";
331     public static final String ERROR_ITEM_QUANTITY_REQUIRED = "error.item.qty.required";
332     public static final String ERROR_INVALID_ACC_NO = "error.inv.accno";
333     public static final String ERROR_REQUIRED = "error.item.description.required";
334     public static final String ERROR_NO_OF_PARTS_REQUIRED = "error.item.noOfParts.required";
335     public static final String ERROR_ATLEAST_ONE_ITEM_QTY_REQUIRED = "error.atleast.one.item.qty.required";
336     public static final String ERROR_SUBSCIPTION_FROM_DATE_REQUIRED = "error.subscription.from.date.required";
337     public static final String ERROR_SUBSCIPTION_TO_DATE_REQUIRED = "error.subscription.to.date.required";
338     public static final String ERROR_SUBSCIPTION_FROM_DATE_GREATER_THAN_TO_DATE = "error.subscription.from.date.greater.than.to.date";
339     public static final String ERROR_NO_PO_WILD_CARD_SEARCH = "error.no.po.wild.card.search";
340 
341     //Added for Requestor Phone Number Validation
342     public static final String REQUESTOR_PERSON_PHONE_NUMBER = "requestorPersonPhoneNumber";
343     public static final String ERROR_REQUESTOR_PHONE_NUMBER = "error.requestor.phone.number";
344     public static final String PURCHASE_ORDER_PERSON_PHONE_NUMBER = "requestorPersonPhoneNumber";
345 
346     //Added for Requestor Notes
347     public static final String REQUESTOR_NOTES_PRE_ORDER_SERVICE = "Requestor Note";
348 
349     // accounting line percent jira OLE-2112.
350     public static final Integer ACCOUNTINGLINE_PERCENT_HUNDRED = 100;
351     // changes for jira OLE-2354
352     public static final Integer ONE = 1;
353     public static final Integer ZERO = 0;
354 
355     public static final String OLE_DOCSEARCH_URL = "ole.docsearch.url";
356 
357     public static final String OLE_DOCSTOREAPP_URL = "ole.docstoreapp.url";
358 
359     public static final String OLE_DOCSTORE_URL = "ole.docstore.url";
360 
361     public static final String DOCUMENT = "document";
362 
363     public static final String FAILURE = "failure";
364 
365     public static final String DOCSTORE_URL_PING = "docStoreUrlPing";
366 
367     public static final String ACCOUNT_TEMPORARY_RESTRICTED_CODE = "T";
368 
369     public static final String ACCOUNT_RESTRICTED_CODE = "R";
370 
371     public static final String RESTRICTED = "restricted";
372 
373     // added for jira OLE-2853
374     public static final String ITEMTITLEID = "itemTitleId";
375 
376     //Added for jira OLE-
377     public static final String OLE_PERSON = "PERSON";
378     public static final String OLE_SYSTEM = "SYSTEM";
379     public static final int PERSON_ENTITY_TYP_CODE_SIZE = 4;
380 
381     //Added for Jira OLE-3060
382     public static final String RICE2_URL = "ole.rice2.url.portal";
383 
384     public static final String VENDOR_DEPOSIT_ACCOUNT = "vendorDepositAccount";
385     public static final String SUBFUND_GROUP_CODE = "subFundGroupCode";
386     public static final String VENDOR_NAME = "vendorName";
387     public static final String INCLUDE = "Include";
388     public static final String EXCLUDE = "Exclude";
389 
390     // Added for jira OLE-3498
391     public static final String SUB_FUND_GRP_CD = "SUB_FUND_GRP_CD";
392     public static final String FUND_GRP_CD = "FUND_GRP_CD";
393     public static final String ACCOUNT_NUMBER = "accountNumber";
394     public static final String PERCENT = "accountLinePercent";
395     public static final String CHART_OF_ACCOUNTS_CODE = "chartOfAccountsCode";
396 
397 
398     //Added for the jira OLE-3508
399     public static final String ERROR_DI_ACCOUNTING_TOTAL = "errors.di.accounting.total";
400 
401     //Added for the jira OLE-3509
402     public static final String ERROR_UNIT_PRICE_REQUIRED = "error.unit.price.required";
403 
404     public static final String REQUISITION = "Requisition";
405 
406     public static final String PURCHASE_ORDER = "Purchase Order";
407 
408     public static final String PAYMENT_REQUEST = "Payment Request";
409     public static final BigDecimal MAX_PERCENT = new BigDecimal(100);
410     public static final BigDecimal ZERO_PERCENT = new BigDecimal(0);
411     public static final String DUPLICATE_INVOICE = "One or more potential duplicate invoices have been identified: " ;
412     public static final String QUES_FOR_DUPLICATE_INVOICE = "Do you want to approve this INV anyway?";
413     public static final String BUDGET_RECORDING_LEVEL_CODE = "O";
414 }