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