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 */ 016 /* 017 * Created on Aug 25, 2004 018 * 019 */ 020 package org.kuali.kfs.module.purap.businessobject; 021 022 import java.util.HashMap; 023 import java.util.Map; 024 import org.apache.commons.lang.builder.ToStringBuilder; 025 026 public class B2BShoppingCartItem { 027 028 private String quantity; 029 private String supplierPartId; 030 private String supplierPartAuxiliaryId; 031 private String unitPrice; 032 private String unitPriceCurrency; 033 private String description; 034 private String unitOfMeasure; 035 private String manufacturerPartID; 036 private String manufacturerName; 037 private Map<String,String> classification = new HashMap<String,String>(); 038 private Map<String,String> extrinsic = new HashMap<String,String>(); 039 private Map<String,String> supplier = new HashMap<String,String>(); 040 041 public B2BShoppingCartItem() { 042 } 043 044 public String getClassification(String domain) { 045 return classification.get(domain); 046 } 047 048 public void addClassification(String domain, String value) { 049 classification.put(domain, value); 050 } 051 052 public Map getClassification() { 053 return classification; 054 } 055 056 public String getDescription() { 057 return description; 058 } 059 060 public void setDescription(String description) { 061 this.description = description; 062 } 063 064 public String getExtrinsic(String domain) { 065 return extrinsic.get(domain); 066 } 067 068 public void addExtrinsic(String domain, String value) { 069 extrinsic.put(domain, value); 070 } 071 072 public Map<String,String> getExtrinsic() { 073 return extrinsic; 074 } 075 076 public String getQuantity() { 077 return quantity; 078 } 079 080 public void setQuantity(String quantity) { 081 this.quantity = quantity; 082 } 083 084 public String getSupplier(String domain) { 085 return supplier.get(domain); 086 } 087 088 public void setSupplier(String domain, String value) { 089 supplier.put(domain, value); 090 } 091 092 public Map<String,String> getSupplier() { 093 return supplier; 094 } 095 096 public String getSupplierPartAuxiliaryId() { 097 return supplierPartAuxiliaryId; 098 } 099 100 public void setSupplierPartAuxiliaryId(String supplierPartAuxiliaryId) { 101 this.supplierPartAuxiliaryId = supplierPartAuxiliaryId; 102 } 103 104 public String getSupplierPartId() { 105 return supplierPartId; 106 } 107 108 public void setSupplierPartId(String supplierPartId) { 109 this.supplierPartId = supplierPartId; 110 } 111 112 public String getUnitOfMeasure() { 113 return unitOfMeasure; 114 } 115 116 public void setUnitOfMeasure(String unitOfMeasure) { 117 this.unitOfMeasure = unitOfMeasure; 118 } 119 120 public String getUnitPrice() { 121 return unitPrice; 122 } 123 124 public void setUnitPrice(String unitPrice) { 125 this.unitPrice = unitPrice; 126 } 127 128 public String getUnitPriceCurrency() { 129 return unitPriceCurrency; 130 } 131 132 public void setUnitPriceCurrency(String unitPriceCurrency) { 133 this.unitPriceCurrency = unitPriceCurrency; 134 } 135 136 public String getManufacturerPartID() { 137 return manufacturerPartID; 138 } 139 140 public void setManufacturerPartID(String manufacturerPartID) { 141 this.manufacturerPartID = manufacturerPartID; 142 } 143 144 public String getManufacturerName() { 145 return manufacturerName; 146 } 147 148 public void setManufacturerName(String manufacturerName) { 149 this.manufacturerName = manufacturerName; 150 } 151 152 public String toString() { 153 154 ToStringBuilder toString = new ToStringBuilder(this); 155 toString.append("quantity", quantity); 156 toString.append("supplierPartId", supplierPartId); 157 toString.append("supplierPartAuxiliaryId", supplierPartAuxiliaryId); 158 toString.append("unitPrice", unitPrice); 159 toString.append("unitPriceCurrency", unitPriceCurrency); 160 toString.append("description", description); 161 toString.append("unitOfMeasure", unitOfMeasure); 162 toString.append("manufacturerPartID", manufacturerPartID); 163 toString.append("manufacturerName", manufacturerName); 164 toString.append("classification", classification); 165 toString.append("extrinsic", extrinsic); 166 toString.append("supplier", supplier); 167 168 return toString.toString(); 169 } 170 171 }