|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.vnd.document.service.impl.VendorServiceImpl
@Transactional public class VendorServiceImpl
Constructor Summary | |
---|---|
VendorServiceImpl()
|
Method Summary | |
---|---|
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.kns.util.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. |
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. |
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. |
VendorAddress |
getVendorDefaultAddress(List<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. |
VendorDetail |
getVendorDetail(Integer headerId,
Integer detailId)
|
VendorDetail |
getVendorDetail(String vendorNumber)
|
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 |
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.kns.service.BusinessObjectService boService)
|
void |
setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
|
void |
setPersistenceService(org.kuali.rice.kns.service.PersistenceService persistenceService)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VendorServiceImpl()
Method Detail |
---|
public void saveVendorHeader(VendorDetail vendorDetail)
saveVendorHeader
in interface VendorService
VendorService.saveVendorHeader(org.kuali.kfs.vnd.businessobject.VendorDetail)
public VendorDetail getByVendorNumber(String vendorNumber)
VendorService
getByVendorNumber
in interface VendorService
vendorNumber
- the given vendor number
org.kuali.kfs.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.kns.util.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
object
VendorService.getApoLimitFromContract(Integer, String, String)
public VendorDetail getParentVendor(Integer vendorHeaderGeneratedIdentifier)
VendorService
getParentVendor
in interface VendorService
vendorHeaderGeneratedIdentifier
- The Header Id in Integer form
VendorService.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(List<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.
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 change
VendorService.noRouteSignificantChangeOccurred(org.kuali.kfs.vnd.businessobject.VendorDetail,
org.kuali.kfs.vnd.businessobject.VendorHeader, org.kuali.kfs.vnd.businessobject.VendorDetail,
org.kuali.kfs.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 list
VendorService.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 form
vendorHeaderGeneratedIdentifier
given is an employee of the
institutionVendorService.isVendorInstitutionEmployee(java.lang.Integer)
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 form
vendorHeaderGeneratedIdentifier
given is valid and is marked as a
foreign vendororg.kuali.kfs.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 form
vendorHeaderGeneratedIdentifier
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 form
vendorHeaderGeneratedIdentifier
given is valid and has a vendor type code of "RF"VendorService.isRevolvingFundCodeVendor(java.lang.Integer)
public VendorContract getVendorB2BContract(VendorDetail vendorDetail, String campus)
VendorService
getVendorB2BContract
in interface VendorService
vendorDetail
- Vendor infocampus
- Campus
VendorService.getVendorB2BContract(org.kuali.kfs.vnd.businessobject.VendorDetail, java.lang.String)
public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService boService)
public void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
public void setPersistenceService(org.kuali.rice.kns.service.PersistenceService persistenceService)
public void setVendorDao(VendorDao vendorDao)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |