org.kuali.kfs.module.purap.document.service.impl
Class B2BShoppingServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.purap.document.service.impl.B2BShoppingServiceImpl
All Implemented Interfaces:
B2BShoppingService

@Transactional
public class B2BShoppingServiceImpl
extends Object
implements B2BShoppingService


Constructor Summary
B2BShoppingServiceImpl()
           
 
Method Summary
protected  RequisitionItem createRequisitionItem(B2BShoppingCartItem item, Integer itemLine)
           
 List createRequisitionsFromCxml(B2BShoppingCart message, org.kuali.rice.kim.bo.Person user)
          Create requisition(s) from cxml and return list for display
protected  List getAllVendorItems(List items, String vendorId, boolean dunsNumberEnabled)
          Get all the items for a specific vendor
protected  List getAllVendors(List items, boolean dunsNumberEnabled)
          Get all the vendors in a single shopping cart by the vendor number.
protected  B2BInformation getB2bShoppingConfigurationInformation()
           
 String getPunchOutUrl(org.kuali.rice.kim.bo.Person user)
          Get URL to punch out to
protected  String getSupplierIdFromFirstItem(List reqItems)
          The supplier id is received on the cxml at the item level, but we store it at the Requisition at the document level.
protected  String getVendorNumber(B2BShoppingCartItem item, boolean dunsNumberEnabled)
          Gets the vendor number from the specified B2BShoppingCartItem, depending on whether DUNS is enabled for B2B: If yes, vendor DUNS number is retrieved from the SupplierId-DUNS tag in the B2B cxml file; otherwise vendor ID is retrieved from the Extrinsic-ExternalSupplierId tag.
 void setB2bDao(B2BDao b2bDao)
           
 void setB2bEnvironment(String environment)
           
 void setB2bPunchbackURL(String punchbackURL)
           
 void setB2bPunchoutURL(String punchoutURL)
           
 void setB2bShoppingIdentity(String b2bShoppingIdentity)
           
 void setB2bShoppingPassword(String password)
           
 void setB2bUserAgent(String userAgent)
           
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
           
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
           
 void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
           
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
           
 void setPersistenceService(org.kuali.rice.kns.service.PersistenceService persistenceService)
           
 void setPhoneNumberService(PhoneNumberService phoneNumberService)
           
 void setPurapService(PurapService purapService)
           
 void setPurchasingService(PurchasingService purchasingService)
           
 void setVendorService(VendorService vendorService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

B2BShoppingServiceImpl

public B2BShoppingServiceImpl()
Method Detail

getB2bShoppingConfigurationInformation

protected B2BInformation getB2bShoppingConfigurationInformation()

getPunchOutUrl

public String getPunchOutUrl(org.kuali.rice.kim.bo.Person user)
Description copied from interface: B2BShoppingService
Get URL to punch out to

Specified by:
getPunchOutUrl in interface B2BShoppingService
Returns:
URL to punch out to
See Also:
org.kuali.kfs.module.purap.document.service.B2BService#getPunchOutUrl(org.kuali.rice.kim.bo.Person)

createRequisitionsFromCxml

public List createRequisitionsFromCxml(B2BShoppingCart message,
                                       org.kuali.rice.kim.bo.Person user)
                                throws org.kuali.rice.kew.exception.WorkflowException
Description copied from interface: B2BShoppingService
Create requisition(s) from cxml and return list for display

Specified by:
createRequisitionsFromCxml in interface B2BShoppingService
user - User doing the requisitioning
Returns:
List of requisitions
Throws:
org.kuali.rice.kew.exception.WorkflowException
See Also:
org.kuali.kfs.module.purap.document.service.B2BService#createRequisitionsFromCxml(org.kuali.kfs.module.purap.util.cxml.B2BParserHelper, org.kuali.rice.kim.bo.Person)

getAllVendors

protected List getAllVendors(List items,
                             boolean dunsNumberEnabled)
Get all the vendors in a single shopping cart by the vendor number.

Parameters:
items - Items in the shopping cart
Returns:
List of VendorDetails for each vendor in the shopping cart

getAllVendorItems

protected List getAllVendorItems(List items,
                                 String vendorId,
                                 boolean dunsNumberEnabled)
Get all the items for a specific vendor

Parameters:
items - List of all items
vendorId - String containing "vendorHeaderId-vendorDetailId"
Returns:
list of RequisitionItems for a specific vendor id

createRequisitionItem

protected RequisitionItem createRequisitionItem(B2BShoppingCartItem item,
                                                Integer itemLine)

getSupplierIdFromFirstItem

protected String getSupplierIdFromFirstItem(List reqItems)
The supplier id is received on the cxml at the item level, but we store it at the Requisition at the document level. Supplier id should be the same for each item received for a vendor so just return the id held on the first item.

Parameters:
reqItems -
Returns:

getVendorNumber

protected String getVendorNumber(B2BShoppingCartItem item,
                                 boolean dunsNumberEnabled)
Gets the vendor number from the specified B2BShoppingCartItem, depending on whether DUNS is enabled for B2B: If yes, vendor DUNS number is retrieved from the SupplierId-DUNS tag in the B2B cxml file; otherwise vendor ID is retrieved from the Extrinsic-ExternalSupplierId tag.

Parameters:
item - the specified B2BShoppingCartItem.
Returns:
the Vendor number retrieved from the B2BShoppingCartItem.

setDocumentService

public void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)

setVendorService

public void setVendorService(VendorService vendorService)

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)

setB2bDao

public void setB2bDao(B2BDao b2bDao)

setPhoneNumberService

public void setPhoneNumberService(PhoneNumberService phoneNumberService)

setPurapService

public void setPurapService(PurapService purapService)

setPurchasingService

public void setPurchasingService(PurchasingService purchasingService)

setKualiConfigurationService

public void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)

setPersistenceService

public void setPersistenceService(org.kuali.rice.kns.service.PersistenceService persistenceService)

setB2bEnvironment

public void setB2bEnvironment(String environment)

setB2bPunchoutURL

public void setB2bPunchoutURL(String punchoutURL)

setB2bPunchbackURL

public void setB2bPunchbackURL(String punchbackURL)

setB2bUserAgent

public void setB2bUserAgent(String userAgent)

setB2bShoppingIdentity

public void setB2bShoppingIdentity(String b2bShoppingIdentity)

setB2bShoppingPassword

public void setB2bShoppingPassword(String password)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.