@Transactional public class VendorServiceImpl extends Object implements VendorService
Modifier and Type | Field and Description |
---|---|
protected org.kuali.rice.krad.service.BusinessObjectService |
businessObjectService |
protected org.kuali.rice.core.api.datetime.DateTimeService |
dateTimeService |
protected org.kuali.rice.krad.service.DocumentService |
documentService |
protected org.kuali.rice.krad.service.NoteService |
noteService |
protected VendorDao |
vendorDao |
Constructor and Description |
---|
VendorServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
createVendorNote(VendorDetail vendorDetail,
String vendorNote) |
boolean |
equalMemberLists(List<? extends VendorRoutingComparable> list_a,
List<? extends VendorRoutingComparable> list_b)
Compares lists which have an isEqualForRouting method by using that method.
|
org.kuali.rice.core.api.util.type.KualiDecimal |
getApoLimitFromContract(Integer contractId,
String chart,
String org)
Gets the apo limit for the given parameters using the following logic:
First it checks to see if an existing VendorContractOrganization object exists for the
associated parameters. |
Building |
getBuildingDetails(String campusCode,
String buildingCode)
get the delivery details
|
VendorDetail |
getByVendorNumber(String vendorNumber)
get the vendor detail with the given vendor number
|
VendorDetail |
getParentVendor(Integer vendorHeaderGeneratedIdentifier)
Retrieves the VendorDetail which is the parent vendor with the given headerId.
|
VendorContract |
getVendorB2BContract(VendorDetail vendorDetail,
String campus)
This method retrieves the B2B Contract for the given Vendor (see method in VendorDao for criteria).
|
VendorDetail |
getVendorByDunsNumber(String vendorDunsNumber)
Retrieves the VendorDetail using its vendorDunsNumber.
|
VendorDao |
getVendorDao() |
VendorAddress |
getVendorDefaultAddress(Collection<VendorAddress> addresses,
String addressType,
String campus)
Finds the default address for the given addressType and campus from the address list passed in based on the following logic:
1) The allDefaultAddress is defined by defaultAddressIndicator on VendorAddress.
|
VendorAddress |
getVendorDefaultAddress(Integer vendorHeaderId,
Integer vendorDetailId,
String addressType,
String campus)
Finds the addresses for the given vendor and then calls the method to determine the default address from this list.
|
VendorDetail |
getVendorDetail(Integer headerId,
Integer detailId) |
VendorDetail |
getVendorDetail(String vendorNumber) |
List<org.kuali.rice.krad.bo.Note> |
getVendorNotes(VendorDetail vendorDetail) |
boolean |
isRevolvingFundCodeVendor(Integer vendorHeaderGeneratedIdentifier)
Indicates whether the vendor identified by the given
vendorHeaderGeneratedIdentifier is a revolving fund code vendor
by checking the value of VendorHeader.getVendorTypeCode() to see if it equals "RF". |
boolean |
isSubjectPaymentVendor(Integer vendorHeaderGeneratedIdentifier)
Indicates whether the vendor identified by the given
vendorHeaderGeneratedIdentifier is a subject payment vendor
by checking the value of VendorHeader.getVendorTypeCode() to see if it equals "SP". |
boolean |
isVendorContractExpired(org.kuali.rice.krad.document.Document document,
VendorDetail vendorDetail)
REQ should have failed APO rules and routed to Contract Mgr Assignment since the REQ had a contracted vendor
used where the contract end date is expired (regardless of the Active Indicator).
|
boolean |
isVendorForeign(Integer vendorHeaderGeneratedIdentifier)
Indicates whether the vendor identified by the given
vendorHeaderGeneratedIdentifier is a non-resident alien
by checking the value of VendorHeader.getVendorForeignIndicator() . |
boolean |
isVendorInstitutionEmployee(Integer vendorHeaderGeneratedIdentifier)
Indicates whether the vendor identified by the given
vendorHeaderGeneratedIdentifier is an employee of the
institution. |
boolean |
noRouteSignificantChangeOccurred(VendorDetail newVDtl,
VendorHeader newVHdr,
VendorDetail oldVDtl,
VendorHeader oldVHdr)
This method is the place to put the calls to equality checks that are needed when deciding whether to route a vendor for
approval or directly to final status on the basis of what has changed.
|
void |
saveVendorHeader(VendorDetail vendorDetail) |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService boService) |
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService) |
void |
setDocumentService(org.kuali.rice.krad.service.DocumentService documentService) |
void |
setVendorDao(VendorDao vendorDao) |
boolean |
shouldVendorRouteForApproval(String documentId)
Checks to see if a the Vendor Document associated with the given document ID should route to the route path branch in
workflow where the document will stop for approvals.
|
protected org.kuali.rice.krad.service.BusinessObjectService businessObjectService
protected org.kuali.rice.krad.service.DocumentService documentService
protected org.kuali.rice.core.api.datetime.DateTimeService dateTimeService
protected org.kuali.rice.krad.service.NoteService noteService
public VendorServiceImpl()
public void saveVendorHeader(VendorDetail vendorDetail)
saveVendorHeader
in interface VendorService
VendorService.saveVendorHeader(org.kuali.ole.vnd.businessobject.VendorDetail)
public VendorDetail getByVendorNumber(String vendorNumber)
VendorService
getByVendorNumber
in interface VendorService
vendorNumber
- the given vendor numberorg.kuali.ole.vnd.document.service.getByVendorNumber(String)
public VendorDetail getVendorDetail(String vendorNumber)
getVendorDetail
in interface VendorService
VendorService.getVendorDetail(String)
public VendorDetail getVendorDetail(Integer headerId, Integer detailId)
getVendorDetail
in interface VendorService
VendorService.getVendorDetail(java.lang.Integer, java.lang.Integer)
public org.kuali.rice.core.api.util.type.KualiDecimal getApoLimitFromContract(Integer contractId, String chart, String org)
VendorService
VendorContractOrganization
object exists for the
associated parameters. If one exists and it is not excluded (see
VendorContractOrganization.isVendorContractExcludeIndicator()
) this will return the value
of VendorContractOrganization.getVendorContractPurchaseOrderLimitAmount()
.VendorContractOrganization
object cannot be found then a valid
VendorContract
object will be sought. If one is found this method will return the value of
VendorContract.getOrganizationAutomaticPurchaseOrderLimit()
.VendorContractOrganization
or
VendorContract
objects can be found for the given parameters this method will return null.getApoLimitFromContract
in interface VendorService
contractId
- id used to find VendorContractOrganization
object and
VendorContract
objectchart
- chart code for use in finding VendorContractOrganization
objectorg
- org code for use in finding VendorContractOrganization
objectVendorService.getApoLimitFromContract(Integer, String, String)
public VendorDetail getParentVendor(Integer vendorHeaderGeneratedIdentifier)
VendorService
getParentVendor
in interface VendorService
vendorHeaderGeneratedIdentifier
- The Header Id in Integer formVendorService.getParentVendor(java.lang.Integer)
public VendorDetail getVendorByDunsNumber(String vendorDunsNumber)
VendorService
getVendorByDunsNumber
in interface VendorService
vendorDunsNumber
- the vendor's DUN number.VendorService.getVendorByDunsNumber(String)
public VendorAddress getVendorDefaultAddress(Integer vendorHeaderId, Integer vendorDetailId, String addressType, String campus)
VendorService
getVendorDefaultAddress
in interface VendorService
vendorHeaderId
- Integer - Header ID of vendor.vendorDetailId
- Integer - Detail ID of vendor.addressType
- String - Address type of desired default.campus
- String - Campus of desired default.VendorService.getVendorDefaultAddress(Integer, Integer, String, String)
public VendorAddress getVendorDefaultAddress(Collection<VendorAddress> addresses, String addressType, String campus)
VendorService
getVendorDefaultAddress
in interface VendorService
addresses
- List of addresses for a vendor.addressType
- String - Address type of the desired default sought.campus
- String - Campus of the desired default sought.org.kuali.ole.vnd.document.service.VendorService#getVendorDefaultAddress(List, String, String)
public boolean shouldVendorRouteForApproval(String documentId)
VendorService
shouldVendorRouteForApproval
in interface VendorService
VendorService.shouldVendorRouteForApproval(java.lang.String)
public boolean noRouteSignificantChangeOccurred(VendorDetail newVDtl, VendorHeader newVHdr, VendorDetail oldVDtl, VendorHeader oldVHdr)
VendorService
noRouteSignificantChangeOccurred
in interface VendorService
newVDtl
- A VendorDetail object representing the state of the proposed changenewVHdr
- A VendorHeader object representing the state of the proposed changeoldVDtl
- A VendorDetail object from before the changeoldVHdr
- A VendorHeader object from before the changeVendorService.noRouteSignificantChangeOccurred(org.kuali.ole.vnd.businessobject.VendorDetail,
org.kuali.ole.vnd.businessobject.VendorHeader, org.kuali.ole.vnd.businessobject.VendorDetail,
org.kuali.ole.vnd.businessobject.VendorHeader)
public boolean equalMemberLists(List<? extends VendorRoutingComparable> list_a, List<? extends VendorRoutingComparable> list_b)
VendorService
equalMemberLists
in interface VendorService
list_a
- A List which implements VendorRoutingComparable (specifies isEqualForRouting)list_b
- Another such listVendorService.equalMemberLists(java.util.List, java.util.List)
public boolean isVendorInstitutionEmployee(Integer vendorHeaderGeneratedIdentifier)
VendorService
vendorHeaderGeneratedIdentifier
is an employee of the
institution. The vendor must have a valid tax id and it must be of type SSN (see
VendorConstants.TAX_TYPE_SSN
).isVendorInstitutionEmployee
in interface VendorService
vendorHeaderGeneratedIdentifier
- The Header Id in Integer formvendorHeaderGeneratedIdentifier
given is an employee of the
institutionVendorService.isVendorInstitutionEmployee(java.lang.Integer)
public void createVendorNote(VendorDetail vendorDetail, String vendorNote)
public List<org.kuali.rice.krad.bo.Note> getVendorNotes(VendorDetail vendorDetail)
getVendorNotes
in interface VendorService
public boolean isVendorForeign(Integer vendorHeaderGeneratedIdentifier)
VendorService
vendorHeaderGeneratedIdentifier
is a non-resident alien
by checking the value of VendorHeader.getVendorForeignIndicator()
.isVendorForeign
in interface VendorService
vendorHeaderGeneratedIdentifier
- The Header Id in Integer formvendorHeaderGeneratedIdentifier
given is valid and is marked as a
foreign vendororg.kuali.ole.vnd.document.service.VendorService#isVendorNonResidentAlien(java.lang.Integer)
public boolean isSubjectPaymentVendor(Integer vendorHeaderGeneratedIdentifier)
VendorService
vendorHeaderGeneratedIdentifier
is a subject payment vendor
by checking the value of VendorHeader.getVendorTypeCode()
to see if it equals "SP".isSubjectPaymentVendor
in interface VendorService
vendorHeaderGeneratedIdentifier
- The Header Id in Integer formvendorHeaderGeneratedIdentifier
given is valid and has a vendor type code of "SP"VendorService.isSubjectPaymentVendor(java.lang.Integer)
public boolean isRevolvingFundCodeVendor(Integer vendorHeaderGeneratedIdentifier)
VendorService
vendorHeaderGeneratedIdentifier
is a revolving fund code vendor
by checking the value of VendorHeader.getVendorTypeCode()
to see if it equals "RF".isRevolvingFundCodeVendor
in interface VendorService
vendorHeaderGeneratedIdentifier
- The Header Id in Integer formvendorHeaderGeneratedIdentifier
given is valid and has a vendor type code of "RF"VendorService.isRevolvingFundCodeVendor(java.lang.Integer)
public Building getBuildingDetails(String campusCode, String buildingCode)
getBuildingDetails
in interface VendorService
public boolean isVendorContractExpired(org.kuali.rice.krad.document.Document document, VendorDetail vendorDetail)
VendorService
isVendorContractExpired
in interface VendorService
org.kuali.kfs.vnd.document.service.VendorService#isVendorContractExpired(org.kuali.kfs.vnd.businessobject.VendorDetail)
public VendorContract getVendorB2BContract(VendorDetail vendorDetail, String campus)
VendorService
getVendorB2BContract
in interface VendorService
vendorDetail
- Vendor infocampus
- Campuspublic void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService boService)
public void setDocumentService(org.kuali.rice.krad.service.DocumentService documentService)
public void setVendorDao(VendorDao vendorDao)
public VendorDao getVendorDao()
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.