| org.kuali.core.maintenance.rules.MaintenanceDocumentRuleBase org.kuali.module.vendor.rules.VendorRule
Method Summary | |
boolean | checkAddressCountryEmptyStateZip(VendorAddress address) | protected boolean | checkAuthorizationRestrictions(MaintenanceDocument document) Overrides the checkAuthorizationRestrictions in MaintenanceDocumentRuleBase. | boolean | checkDefaultAddressCampus(VendorDetail vendorDetail, VendorDefaultAddress addedDefaultAddress, VendorAddress parent) If add button is selected on Default Address, checks if the allow default indicator is set to false for this address type
then it does not allow user to select a default address for this address and if it is true then it allows only one campus to
be default for this address. | boolean | checkFaxNumber(VendorAddress address) Validates that the Vendor Fax Number is a valid phone number. | boolean | findAllowDefaultAddressIndicatorHelper(VendorAddress vendorAddress) Checks if the "allow default indicator" is true or false for this address. | boolean | processAddressValidation(MaintenanceDocument document) Validates vendor address fields. | public boolean | processCustomAddCollectionLineBusinessRules(MaintenanceDocument document, String collectionName, PersistableBusinessObject bo) Validates business rules for VendorDetail document collection add lines. | protected boolean | processCustomApproveDocumentBusinessRules(MaintenanceDocument document) | protected boolean | processCustomRouteDocumentBusinessRules(MaintenanceDocument document) | protected boolean | processCustomSaveDocumentBusinessRules(MaintenanceDocument document) | boolean | processVendorValidation(MaintenanceDocument document) Validates VendorDetail document. | void | refreshSubObjects(VendorDetail vendor) | public void | setupBaseConvenienceObjects(MaintenanceDocument document) Overrides the setupBaseConvenienceObjects from the superclass because we cannot use the setupBaseConvenienceObjects from the
superclass. | public void | setupConvenienceObjects() | boolean | validateDefaultAddressCampus(VendorDetail vendorDetail) Checks if the allow default indicator is set to false for this address the default indicator cannot be set to true/yes. | boolean | validateInactiveReasonRequiredness(VendorDetail vendorDetail) Validates that if the vendor is set to be inactive, the inactive reason is required. | boolean | validateParentVendorTaxNumber(VendorDetail vendorDetail) Validates that if vendor is parent, then tax # and tax type combo should be unique by checking for the existence of vendor(s)
with the same tax # and tax type in the existing vendor header table. | boolean | validateRestrictedReasonRequiredness(VendorDetail vendorDetail) Validates that, if the vendor is set to be restricted, the restricted reason is required. | boolean | validateTaxNumberRequiredness(VendorDetail vendorDetail) Validates that if the vendor is not foreign and if the vendor type's tax number required indicator is true, then the tax
number is required. | boolean | validateTaxTypeAndTaxNumberBlankness(VendorDetail vendorDetail) Validates that the following business rules are satisfied: 1. | boolean | validateVendorContractBeginEndDates(VendorContract contract) Validates that: 1. | boolean | validateVendorContractOrganization(VendorContractOrganization organization) Validates a vendor contract organization. | boolean | validateVendorContractPOLimitAndExcludeFlagCombination(VendorContract contract) Validates that the proper combination of Exclude Indicator and APO Amount is present on a vendor contract. | boolean | validateVendorCustomerNumber(VendorCustomerNumber customerNumber) Validates vendor customer number. | protected boolean | validateVendorNames(VendorDetail vendorDetail) Validates the vendorName, vendorFirstName and vendorLastName fields according to these business rules: 1. |
checkAddressCountryEmptyStateZip | boolean checkAddressCountryEmptyStateZip(VendorAddress address)(Code) | | Validates that if US is selected for the country then the state and zip cannot be empty
Parameters: addresses - VendorAddress which is being validated boolean false if the country is United States and there is no state or zip code |
checkAuthorizationRestrictions | protected boolean checkAuthorizationRestrictions(MaintenanceDocument document)(Code) | | Overrides the checkAuthorizationRestrictions in MaintenanceDocumentRuleBase. The reason we needed to override it is because
in vendor, we had to save the fields in the vendor header separately than vendor detail, and those fields are only editable
when the vendor is a parent. Therefore we had to override the setupBaseConvenienceObjects method, which then causes us unable
to set the oldBo of the super class because the oldBo is not accessible from outside the class. This will cause the
checkAuthorizationRestrictions of the superclass to fail while processing division vendors that contain those restricted
(uneditable) fields, because the oldBo is null and will throw the null pointer exception. Therefore we're overriding the
checkAuthorizationRestrictions in here and we'll use the oldVendor instead of oldBo of the superclass while comparing the old
and new values. This also does not enforce the authorization restrictions if the restricted fields are the fields in vendor
header or the vendor is not a parent vendor, because in this case, the fields are uneditable from the user interface.
See Also: org.kuali.core.maintenance.rules.MaintenanceDocumentRuleBase.checkAuthorizationRestrictions(org.kuali.core.document.MaintenanceDocument) |
checkDefaultAddressCampus | boolean checkDefaultAddressCampus(VendorDetail vendorDetail, VendorDefaultAddress addedDefaultAddress, VendorAddress parent)(Code) | | If add button is selected on Default Address, checks if the allow default indicator is set to false for this address type
then it does not allow user to select a default address for this address and if it is true then it allows only one campus to
be default for this address.
Parameters: vendorDetail - VendorDetail document Parameters: addedDefaultAddress - VendorDefaultAddress which is being added Parameters: parent - The VendorAddress which we are adding a default address to it boolean false or true |
checkFaxNumber | boolean checkFaxNumber(VendorAddress address)(Code) | | Validates that the Vendor Fax Number is a valid phone number.
Parameters: addresses - VendorAddress instance boolean false or true |
findAllowDefaultAddressIndicatorHelper | boolean findAllowDefaultAddressIndicatorHelper(VendorAddress vendorAddress)(Code) | | Checks if the "allow default indicator" is true or false for this address.
Parameters: addresses - VendorAddress which is being validated boolean false or true |
processAddressValidation | boolean processAddressValidation(MaintenanceDocument document)(Code) | | Validates vendor address fields.
Parameters: document - MaintenanceDocument boolean false or true |
processVendorValidation | boolean processVendorValidation(MaintenanceDocument document)(Code) | | Validates VendorDetail document.
Parameters: document - MaintenanceDocument instance boolean false or true |
refreshSubObjects | void refreshSubObjects(VendorDetail vendor)(Code) | | Refreshes the references of vendor detail and its sub objects
Parameters: vendor - VendorDetail document |
setupBaseConvenienceObjects | public void setupBaseConvenienceObjects(MaintenanceDocument document)(Code) | | Overrides the setupBaseConvenienceObjects from the superclass because we cannot use the setupBaseConvenienceObjects from the
superclass. The reason we cannot use the superclass method is because it calls the updateNonUpdateableReferences for
everything and we cannot do that for parent vendors, because we want to update vendor header information only on parent
vendors, so the saving of the vendor header is done manually. If we call the updateNonUpdateableReferences, it is going to
overwrite any changes that the user might have done in the vendor header with the existing values in the database.
See Also: org.kuali.core.maintenance.rules.MaintenanceDocumentRuleBase.setupBaseConvenienceObjects(org.kuali.core.document.MaintenanceDocument) |
validateDefaultAddressCampus | boolean validateDefaultAddressCampus(VendorDetail vendorDetail)(Code) | | Checks if the allow default indicator is set to false for this address the default indicator cannot be set to true/yes. If
"allow default indicator" is set to true/yes for address type, one address must have the default indicator set (no more, no
less) and only one campus to be set as default for this address.
Parameters: vendorDetail - VendorDetail document boolean false or true |
validateInactiveReasonRequiredness | boolean validateInactiveReasonRequiredness(VendorDetail vendorDetail)(Code) | | Validates that if the vendor is set to be inactive, the inactive reason is required.
Parameters: vendorDetail - the VendorDetail object to be validated boolean false if the vendor is inactive and the inactive reason is empty |
validateParentVendorTaxNumber | boolean validateParentVendorTaxNumber(VendorDetail vendorDetail)(Code) | | Validates that if vendor is parent, then tax # and tax type combo should be unique by checking for the existence of vendor(s)
with the same tax # and tax type in the existing vendor header table. Ideally we're also supposed to check for pending
vendors, but at the moment, the pending vendors are under research investigation, so we're only checking the existing vendors
for now. If the vendor is a parent and the validation fails, display the actual error message. If the vendor is not a parent
and the validation fails, display the error message that the parent of this vendor needs to be changed, please contact
Purchasing Dept. While checking for the existence of vendors with the same tax # and tax type, exclude the vendors with the
same id. KULPURAP-302: Allow a duplication of a tax number in vendor header if there are only "inactive" header records with
the duplicate record
Parameters: vendorDetail - the VendorDetail object to be validated boolean true if the vendorDetail passes the unique tax # and tax type validation. |
validateRestrictedReasonRequiredness | boolean validateRestrictedReasonRequiredness(VendorDetail vendorDetail)(Code) | | Validates that, if the vendor is set to be restricted, the restricted reason is required.
Parameters: vendorDetail - The VendorDetail object to be validated boolean false if the vendor is restricted and the restricted reason is empty |
validateTaxNumberRequiredness | boolean validateTaxNumberRequiredness(VendorDetail vendorDetail)(Code) | | Validates that if the vendor is not foreign and if the vendor type's tax number required indicator is true, then the tax
number is required. If the vendor foreign indicator is true, then the tax number is not required regardless of its vendor
type.
Parameters: vendorDetail - the VendorDetail object to be validated boolean false if there is no tax number and the indicator is true. |
validateTaxTypeAndTaxNumberBlankness | boolean validateTaxTypeAndTaxNumberBlankness(VendorDetail vendorDetail)(Code) | | Validates that the following business rules are satisfied: 1. Tax type cannot be blank if the tax # is not blank. 2. Tax type
cannot be set if the tax # is blank. If the vendor is a parent and the validation fails, we'll display an error message
indicating that the tax type cannot be blank if the tax # is not blank or that the tax type cannot be set if the tax # is
blank. If the vendor is not a parent and the validation fails, we'll display an error message indicating that the parent of
this vendor needs to be changed, please contact Purchasing Dept.
Parameters: vendorDetail - the VendorDetail object to be validated boolean true if the vendor Detail passes the validation and false otherwise. |
validateVendorContractBeginEndDates | boolean validateVendorContractBeginEndDates(VendorContract contract)(Code) | | Validates that: 1. If the VendorContractBeginningDate is entered then the VendorContractEndDate is also entered, and vice
versa. 2. If both dates are entered, the VendorContractBeginningDate is before the VendorContractEndDate. The date fields are
required so we should know that we have valid dates.
Parameters: contract - VendorContract boolean true if the beginning date is before the end date, false if only one date is entered or the beginning date isafter the end date. |
validateVendorContractOrganization | boolean validateVendorContractOrganization(VendorContractOrganization organization)(Code) | | Validates a vendor contract organization. The rules are : 1. If the Exclude Indicator for the organization is N, an
organization APO Amount is required. 2. If the Exclude Indicator for the organization is Y, an organization APO Amount is not
allowed. 3. The chart and org for the organization must exist in the database.
Parameters: organization - VendorContractOrganization boolean true if these three rules are passed, otherwise false. |
validateVendorContractPOLimitAndExcludeFlagCombination | boolean validateVendorContractPOLimitAndExcludeFlagCombination(VendorContract contract)(Code) | | Validates that the proper combination of Exclude Indicator and APO Amount is present on a vendor contract. Do not perform
this validation on Contract add line as the user cannot currently enter the sub-collection of contract-orgs so we should not
force this until the document is submitted. The rules are : 1. Must enter a Default APO Limit or at least one organization
with an APO Amount. 2. If the Exclude Indicator for an organization is N, an organization APO Amount is required. 3. If the
Exclude Indicator for an organization is Y, the organization APO Amount is not allowed.
Parameters: contract - VendorContract boolean true if the proper combination of Exclude Indicator and APO Amount is present, otherwise flase. |
validateVendorCustomerNumber | boolean validateVendorCustomerNumber(VendorCustomerNumber customerNumber)(Code) | | Validates vendor customer number. The chart and org must exist in the database.
Parameters: customerNumber - VendorCustomerNumber boolean false or true |
validateVendorNames | protected boolean validateVendorNames(VendorDetail vendorDetail)(Code) | | Validates the vendorName, vendorFirstName and vendorLastName fields according to these business rules: 1. At least one of the
three vendor name fields must be filled in. 2. Both of the two ways of entering vendor name (One vendor name field vs
VendorFirstName/VendorLastName) cannot be used 3. If either the vendor first name or the vendor last name have been entered,
the other must be entered.
Parameters: vendorDetail - The VendorDetail object to be validated boolean true if the vendorDetail passes this validation and false otherwise. |
Methods inherited from org.kuali.core.maintenance.rules.MaintenanceDocumentRuleBase | protected boolean apcRuleFails(String parameterNamespace, String parameterDetailTypeCode, String parameterName, String valueToTest)(Code)(Java Doc) protected boolean applyApcRule(String parameterNamespace, String parameterDetailTypeCode, String parameterName, String valueToTest)(Code)(Java Doc) protected boolean checkAuthorizationRestrictions(MaintenanceDocument document)(Code)(Java Doc) protected boolean checkEmptyBOField(String propertyName, Object valueToTest, String parameter)(Code)(Java Doc) protected boolean checkEmptyDocumentField(String propertyName, Object valueToTest, String parameter)(Code)(Java Doc) protected boolean checkEmptyValue(Object valueToTest)(Code)(Java Doc) protected boolean checkForPartiallyFilledOutReferenceForeignKeys(String referenceName)(Code)(Java Doc) protected void clearErrorPath()(Code)(Java Doc) protected boolean dataDictionaryValidate(MaintenanceDocument document)(Code)(Java Doc) final protected BusinessObjectDictionaryService getBoDictionaryService()(Code)(Java Doc) final protected BusinessObjectService getBoService()(Code)(Java Doc) final protected KualiConfigurationService getConfigService()(Code)(Java Doc) public DateTimeService getDateTimeService()(Code)(Java Doc) final protected DataDictionaryService getDdService()(Code)(Java Doc) final protected DictionaryValidationService getDictionaryValidationService()(Code)(Java Doc) final protected DocumentAuthorizationService getDocumentAuthorizationService()(Code)(Java Doc) protected String getFieldLabel(String fieldName)(Code)(Java Doc) protected String getFieldLabel(Class boClass, String fieldName)(Code)(Java Doc) final protected MaintenanceDocumentDictionaryService getMaintDocDictionaryService()(Code)(Java Doc) final protected PersistableBusinessObject getNewBo()(Code)(Java Doc) final protected PersistableBusinessObject getOldBo()(Code)(Java Doc) final protected PersistenceService getPersistenceService()(Code)(Java Doc) final protected PersistenceStructureService getPersistenceStructureService()(Code)(Java Doc) public UniversalUserService getUniversalUserService()(Code)(Java Doc) public WorkflowDocumentService getWorkflowDocumentService()(Code)(Java Doc) protected boolean isCorrectMaintenanceClass(MaintenanceDocument document, Class clazz)(Code)(Java Doc) protected boolean isDocumentValidForSave(MaintenanceDocument maintenanceDocument)(Code)(Java Doc) public boolean processAddCollectionLineBusinessRules(MaintenanceDocument document, String collectionName, PersistableBusinessObject bo)(Code)(Java Doc) public boolean processApproveDocument(ApproveDocumentEvent approveEvent)(Code)(Java Doc) public boolean processCustomAddCollectionLineBusinessRules(MaintenanceDocument document, String collectionName, PersistableBusinessObject line)(Code)(Java Doc) protected boolean processCustomApproveDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processCustomRouteDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processCustomSaveDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processGlobalApproveDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processGlobalRouteDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) protected boolean processGlobalSaveDocumentBusinessRules(MaintenanceDocument document)(Code)(Java Doc) public boolean processRouteDocument(Document document)(Code)(Java Doc) public boolean processSaveDocument(Document document)(Code)(Java Doc) protected void putDocumentError(String propertyName, String errorConstant, String parameter)(Code)(Java Doc) protected void putDocumentError(String propertyName, String errorConstant, String[] parameters)(Code)(Java Doc) protected void putFieldError(String propertyName, String errorConstant)(Code)(Java Doc) protected void putFieldError(String propertyName, String errorConstant, String parameter)(Code)(Java Doc) protected void putFieldError(String propertyName, String errorConstant, String[] parameters)(Code)(Java Doc) protected void putFieldErrorWithShortLabel(String propertyName, String errorConstant)(Code)(Java Doc) protected void putGlobalError(String errorConstant)(Code)(Java Doc) protected void putGlobalError(String errorConstant, String parameter)(Code)(Java Doc) protected void putGlobalError(String errorConstant, String[] parameters)(Code)(Java Doc) protected void putGlobalsError(String propertyName, String errorConstant)(Code)(Java Doc) protected void putGlobalsError(String propertyName, String errorConstant, String parameter)(Code)(Java Doc) protected void resumeErrorPath()(Code)(Java Doc) final public void setBoDictionaryService(BusinessObjectDictionaryService boDictionaryService)(Code)(Java Doc) final public void setBoService(BusinessObjectService boService)(Code)(Java Doc) final public void setConfigService(KualiConfigurationService configService)(Code)(Java Doc) final public void setDdService(DataDictionaryService ddService)(Code)(Java Doc) final public void setDictionaryValidationService(DictionaryValidationService dictionaryValidationService)(Code)(Java Doc) final public void setDocumentAuthorizationService(DocumentAuthorizationService documentAuthorizationService)(Code)(Java Doc) final public void setMaintDocDictionaryService(MaintenanceDocumentDictionaryService maintDocDictionaryService)(Code)(Java Doc) protected void setNewBo(PersistableBusinessObject newBo)(Code)(Java Doc) final public void setPersistenceService(PersistenceService persistenceService)(Code)(Java Doc) final public void setPersistenceStructureService(PersistenceStructureService persistenceStructureService)(Code)(Java Doc) public void setUniversalUserService(UniversalUserService universalUserService)(Code)(Java Doc) public void setWorkflowDocumentService(WorkflowDocumentService workflowDocumentService)(Code)(Java Doc) public void setupBaseConvenienceObjects(MaintenanceDocument document)(Code)(Java Doc) public void setupConvenienceObjects()(Code)(Java Doc) protected boolean validateDocumentStructure(Document document)(Code)(Java Doc) protected boolean validateGlobalBusinessObjectPersistable(MaintenanceDocument document)(Code)(Java Doc) protected boolean validateMaintenanceDocument(MaintenanceDocument maintenanceDocument)(Code)(Java Doc)
|
|
|