001package org.kuali.ole.select.form; 002 003import java.util.HashMap; 004import java.util.Map; 005 006import org.kuali.ole.select.document.OleInvoiceDocument; 007import org.kuali.rice.krad.web.form.TransactionalDocumentFormBase; 008 009/** 010 * Created with IntelliJ IDEA. 011 * User: anithaa 012 * Date: 7/8/13 013 * Time: 7:30 PM 014 * To change this template use File | Settings | File Templates. 015 */ 016public class OLEInvoiceForm extends TransactionalDocumentFormBase { 017 018 private String sfcFailRouteMsg; 019 private String sfcFailApproveMsg; 020 private String itemLimit; 021 022 private String validationMessage; 023 private String validationFlag; 024 private String subscriptionValidationMessage; 025 private String blanketApproveSubscriptionDateValidationFlag; 026 private String subscriptionDateValidationMessage; 027 private String subscriptionDateValidationFlag; 028 029 private String duplicationMessage; 030 private String duplicationApproveMessage; 031 032 private boolean filterProcessItems = true; 033 private Boolean filterAdditionalCharges; 034 035 private String pageNumber; 036 private String selectRowDetails; 037 private String urlBase; 038 private boolean showSelectedRowDetails; 039 private boolean successFlag; 040 private boolean blanketApproveSuccessFlag; 041 042 public String getSubscriptionDateValidationFlag() { 043 return subscriptionDateValidationFlag; 044 } 045 046 public void setSubscriptionDateValidationFlag(String subscriptionDateValidationFlag) { 047 this.subscriptionDateValidationFlag = subscriptionDateValidationFlag; 048 } 049 050 private String amountExceedsMessage; 051 private String amountExceedsMesgForBlankApp; 052 053 public String getSubscriptionDateValidationMessage() { 054 return subscriptionDateValidationMessage; 055 } 056 057 public void setSubscriptionDateValidationMessage(String subscriptionDateValidationMessage) { 058 this.subscriptionDateValidationMessage = subscriptionDateValidationMessage; 059 } 060 061 public String getSubscriptionValidationMessage() { 062 return subscriptionValidationMessage; 063 } 064 065 public void setSubscriptionValidationMessage(String subscriptionValidationMessage) { 066 this.subscriptionValidationMessage = subscriptionValidationMessage; 067 } 068 069 public String getBlanketApproveSubscriptionDateValidationFlag() { 070 return blanketApproveSubscriptionDateValidationFlag; 071 } 072 073 public void setBlanketApproveSubscriptionDateValidationFlag(String blanketApproveSubscriptionDateValidationFlag) { 074 this.blanketApproveSubscriptionDateValidationFlag = blanketApproveSubscriptionDateValidationFlag; 075 } 076 077 public String getAmountExceedsMesgForBlankApp() { 078 return amountExceedsMesgForBlankApp; 079 } 080 081 public void setAmountExceedsMesgForBlankApp(String amountExceedsMesgForBlankApp) { 082 this.amountExceedsMesgForBlankApp = amountExceedsMesgForBlankApp; 083 } 084 085 public String getAmountExceedsMessage() { 086 return amountExceedsMessage; 087 } 088 089 public void setAmountExceedsMessage(String amountExceedsMessage) { 090 this.amountExceedsMessage = amountExceedsMessage; 091 } 092 093 public OLEInvoiceForm() { 094 super(); 095 } 096 097 @Override 098 protected String getDefaultDocumentTypeName() { 099 return "OLE_PRQS"; 100 } 101 102 public String getSfcFailRouteMsg() { 103 return sfcFailRouteMsg; 104 } 105 106 public void setSfcFailRouteMsg(String sfcFailRouteMsg) { 107 this.sfcFailRouteMsg = sfcFailRouteMsg; 108 } 109 110 public String getSfcFailApproveMsg() { 111 return sfcFailApproveMsg; 112 } 113 114 public void setSfcFailApproveMsg(String sfcFailApproveMsg) { 115 this.sfcFailApproveMsg = sfcFailApproveMsg; 116 } 117 118 public String getItemLimit() { 119 return itemLimit; 120 } 121 122 public void setItemLimit(String itemLimit) { 123 this.itemLimit = itemLimit; 124 } 125 126 public String getValidationMessage() { 127 return validationMessage; 128 } 129 130 public void setValidationMessage(String validationMessage) { 131 this.validationMessage = validationMessage; 132 } 133 134 public String getValidationFlag() { 135 return validationFlag; 136 } 137 138 public void setValidationFlag(String validationFlag) { 139 this.validationFlag = validationFlag; 140 } 141 142 /** 143 * This method gets the duplicationMessage 144 * @return duplicationMessage 145 */ 146 public String getDuplicationMessage() { 147 return duplicationMessage; 148 } 149 150 /** 151 * This method sets the duplicationMessage 152 * @param duplicationMessage 153 */ 154 public void setDuplicationMessage(String duplicationMessage) { 155 this.duplicationMessage = duplicationMessage; 156 } 157 158 public String getDuplicationApproveMessage() { 159 return duplicationApproveMessage; 160 } 161 162 public void setDuplicationApproveMessage(String duplicationApproveMessage) { 163 this.duplicationApproveMessage = duplicationApproveMessage; 164 } 165 166 public boolean isFilterProcessItems() { 167 return filterProcessItems; 168 } 169 170 public void setFilterProcessItems(boolean filterProcessItems) { 171 this.filterProcessItems = filterProcessItems; 172 } 173 174 public boolean isFilterAdditionalCharges() { 175 if (filterAdditionalCharges == null) { 176 OleInvoiceDocument doc = (OleInvoiceDocument) getDocument(); 177 filterAdditionalCharges = doc == null ? true : !doc.isAdditionalChargesFlag(); 178 } 179 return filterAdditionalCharges; 180 } 181 182 public void setFilterAdditionalCharges(boolean filterAdditionalCharges) { 183 this.filterAdditionalCharges = filterAdditionalCharges; 184 } 185 186 public boolean isFilterRequisition() { 187 Map<String, Object> ext = getExtensionData(); 188 for (String k : ext.keySet()) 189 if (k != null && k.startsWith("requisition")) 190 return false; 191 return true; 192 } 193 194 public boolean showRequisition(String id) { 195 return Boolean.TRUE.equals(getExtensionData().get("requisition" + id)); 196 } 197 198 public void setShowRequisitionFor(String id) { 199 Map<String, Object> ext = getExtensionData(); 200 synchronized (ext) { 201 ext.put("requisition" + id, Boolean.TRUE); 202 } 203 } 204 205 public void setHideRequisitionFor(String id) { 206 Map<String, Object> ext = getExtensionData(); 207 synchronized (ext) { 208 ext.remove("requisition" + id); 209 } 210 } 211 212 public boolean isFilterLineItemReceiving() { 213 Map<String, Object> ext = getExtensionData(); 214 for (String k : ext.keySet()) 215 if (k != null && k.startsWith("LineItemReceiving")) 216 return false; 217 return true; 218 } 219 220 public boolean showLineItemReceiving(String id) { 221 return Boolean.TRUE.equals(getExtensionData().get("LineItemReceiving" + id)); 222 } 223 224 public void setShowLineItemReceivingFor(String id) { 225 Map<String, Object> ext = getExtensionData(); 226 synchronized (ext) { 227 ext.put("LineItemReceiving" + id, Boolean.TRUE); 228 } 229 } 230 231 public void setHideLineItemReceivingFor(String id) { 232 Map<String, Object> ext = getExtensionData(); 233 synchronized (ext) { 234 ext.remove("LineItemReceiving" + id); 235 } 236 } 237 238 public boolean isFilterCorrection() { 239 Map<String, Object> ext = getExtensionData(); 240 for (String k : ext.keySet()) 241 if (k != null && k.startsWith("Correction")) 242 return false; 243 return true; 244 } 245 246 public boolean showCorrection(String id) { 247 return Boolean.TRUE.equals(getExtensionData().get("Correction" + id)); 248 } 249 250 public void setShowCorrectionFor(String id) { 251 Map<String, Object> ext = getExtensionData(); 252 synchronized (ext) { 253 ext.put("Correction" + id, Boolean.TRUE); 254 } 255 } 256 257 public void setHideCorrectionFor(String id) { 258 Map<String, Object> ext = getExtensionData(); 259 synchronized (ext) { 260 ext.remove("Correction" + id); 261 } 262 } 263 264 public boolean isFilterPaymentRequest() { 265 Map<String, Object> ext = getExtensionData(); 266 for (String k : ext.keySet()) 267 if (k != null && k.startsWith("PaymentRequest")) 268 return false; 269 return true; 270 } 271 272 public boolean showPaymentRequest(String id) { 273 return Boolean.TRUE.equals(getExtensionData().get("PaymentRequest" + id)); 274 } 275 276 public void setShowPaymentRequestFor(String id) { 277 Map<String, Object> ext = getExtensionData(); 278 synchronized (ext) { 279 ext.put("PaymentRequest" + id, Boolean.TRUE); 280 } 281 } 282 283 public void setHidePaymentRequestFor(String id) { 284 Map<String, Object> ext = getExtensionData(); 285 synchronized (ext) { 286 ext.remove("PaymentRequest" + id); 287 } 288 } 289 290 public boolean isFilterCreditMemo() { 291 Map<String, Object> ext = getExtensionData(); 292 for (String k : ext.keySet()) 293 if (k != null && k.startsWith("CreditMemo")) 294 return false; 295 return true; 296 } 297 298 public boolean showCreditMemo(String id) { 299 return Boolean.TRUE.equals(getExtensionData().get("CreditMemo" + id)); 300 } 301 302 public void setShowCreditMemoFor(String id) { 303 Map<String, Object> ext = getExtensionData(); 304 synchronized (ext) { 305 ext.put("CreditMemo" + id, Boolean.TRUE); 306 } 307 } 308 309 public void setHideCreditMemoFor(String id) { 310 Map<String, Object> ext = getExtensionData(); 311 synchronized (ext) { 312 ext.remove("CreditMemo" + id); 313 } 314 } 315 316 public String getPageNumber() { 317 return pageNumber; 318 } 319 320 public void setPageNumber(String pageNumber) { 321 this.pageNumber = pageNumber; 322 } 323 324 public String getSelectRowDetails() { 325 return selectRowDetails; 326 } 327 328 public void setSelectRowDetails(String selectRowDetails) { 329 this.selectRowDetails = selectRowDetails; 330 } 331 332 public boolean isShowSelectedRowDetails() { 333 return showSelectedRowDetails; 334 } 335 336 public void setShowSelectedRowDetails(boolean showSelectedRowDetails) { 337 this.showSelectedRowDetails = showSelectedRowDetails; 338 } 339 340 public String getUrlBase() { 341 return urlBase; 342 } 343 344 public void setUrlBase(String urlBase) { 345 this.urlBase = urlBase; 346 } 347 348 public boolean isSuccessFlag() { 349 return successFlag; 350 } 351 352 public void setSuccessFlag(boolean successFlag) { 353 this.successFlag = successFlag; 354 } 355 356 public boolean isBlanketApproveSuccessFlag() { 357 return blanketApproveSuccessFlag; 358 } 359 360 public void setBlanketApproveSuccessFlag(boolean blanketApproveSuccessFlag) { 361 this.blanketApproveSuccessFlag = blanketApproveSuccessFlag; 362 } 363} 364