|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.kns.rules.DocumentRuleBase
org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
org.kuali.kfs.module.ar.document.validation.impl.CustomerRule
public class CustomerRule
| Field Summary | |
|---|---|
protected org.kuali.rice.kns.service.DateTimeService |
dateTimeService
|
protected static org.apache.log4j.Logger |
LOG
|
protected Customer |
newCustomer
|
protected Customer |
oldCustomer
|
| Fields inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase |
|---|
boDictionaryService, boService, businessObjectAuthorizationService, configService, ddService, dictionaryValidationService, DOCUMENT_ERROR_PREFIX, documentHelperService, MAINTAINABLE_ERROR_PATH, MAINTAINABLE_ERROR_PREFIX, maintDocDictionaryService, persistenceService, persistenceStructureService, personService, priorErrorPath, roleService, workflowDocumentService |
| Constructor Summary | |
|---|---|
CustomerRule()
|
|
| Method Summary | |
|---|---|
boolean |
checkAddresses(Customer customer)
This method checks if the customer addresses are valid: has one and only one primary address |
boolean |
checkAddressIsValid(CustomerAddress customerAddress)
|
boolean |
checkAddressIsValid(CustomerAddress customerAddress,
int ind)
This method checks if the address is valid |
boolean |
checkCustomerHasAddress(Customer newCustomer)
This method checks if the new customer has at least one address |
boolean |
checkEndDateIsValid(Date endDate,
boolean canBeTodaysDateFlag)
This method checks if customer end date is valid: 1. |
boolean |
checkIfPrimaryAddressActive(Date newEndDate,
int ind)
|
boolean |
checkNameIsValidLength(String customerName)
This method checks if the customer name entered is greater than or equal to three (3) characters long. |
boolean |
checkTaxNumber(Customer customer)
This method checks if tax number is entered when tax number is required |
protected void |
initializeAttributes(org.kuali.rice.kns.document.MaintenanceDocument document)
This method initializes the old and new customer |
boolean |
isTaxNumberRequired()
This method checks if tax number is required |
boolean |
processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document,
String collectionName,
org.kuali.rice.kns.bo.PersistableBusinessObject line)
|
protected boolean |
processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
|
protected boolean |
setCustomerNumber()
This method sets the new customer number |
boolean |
validateAddresses(Customer customer)
|
boolean |
validateEndDateForExistingCustomerAddress(Date newEndDate,
int ind)
|
boolean |
validateEndDateForNewAddressLine(Date endDate)
|
| Methods inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase |
|---|
apcRuleFails, applyApcRule, checkEmptyBOField, checkEmptyDocumentField, checkEmptyValue, checkForPartiallyFilledOutReferenceForeignKeys, clearErrorPath, consolidateFieldNames, dataDictionaryValidate, errorAlreadyExists, getBoDictionaryService, getBoService, getBusinessObjectAuthorizationService, getConfigService, getDateTimeService, getDdService, getDictionaryValidationService, getDocumentHelperService, getFieldLabel, getFieldLabel, getHumanReadablePrimaryKeyFieldNames, getMaintDocDictionaryService, getNewBo, getOldBo, getPersistenceService, getPersistenceStructureService, getPersonService, getRoleService, getWorkflowDocumentService, isCorrectMaintenanceClass, isDocumentInactivatingBusinessObject, isDocumentValidForSave, primaryKeyCheck, processAddCollectionLineBusinessRules, processApproveDocument, processCustomApproveDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processGlobalApproveDocumentBusinessRules, processGlobalRouteDocumentBusinessRules, processGlobalSaveDocumentBusinessRules, processInactivationBlockChecking, processInactivationBlockChecking, processRouteDocument, processSaveDocument, putDocumentError, putDocumentError, putFieldError, putFieldError, putFieldError, putFieldErrorWithShortLabel, putGlobalError, putGlobalError, putGlobalError, putGlobalsError, putGlobalsError, putInactivationBlockingErrorOnPage, resumeErrorPath, setBoDictionaryService, setBoService, setBusinessObjectAuthorizationService, setConfigService, setDdService, setDictionaryValidationService, setDocumentHelperService, setMaintDocDictionaryService, setNewBo, setPersistenceService, setPersistenceStructureService, setPersonService, setupBaseConvenienceObjects, setupConvenienceObjects, setWorkflowDocumentService, showErrorMap, validateDocumentStructure, validateDuplicateIdentifierInDataDictionary, validateGlobalBusinessObjectPersistable, validateMaintenanceDocument |
| Methods inherited from class org.kuali.rice.kns.rules.DocumentRuleBase |
|---|
getDataDictionaryService, getIdentityManagementService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getWorkflowInfoService, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomRouteDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processSendAdHocRequests, setMaxDictionaryValidationDepth, validateSensitiveDataValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.log4j.Logger LOG
protected Customer oldCustomer
protected Customer newCustomer
protected org.kuali.rice.kns.service.DateTimeService dateTimeService
| Constructor Detail |
|---|
public CustomerRule()
| Method Detail |
|---|
protected void initializeAttributes(org.kuali.rice.kns.document.MaintenanceDocument document)
document - protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
processCustomRouteDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBaseMaintenanceDocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)protected boolean setCustomerNumber()
public boolean checkCustomerHasAddress(Customer newCustomer)
newCustomer - the new customer
public boolean processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document,
String collectionName,
org.kuali.rice.kns.bo.PersistableBusinessObject line)
processCustomAddCollectionLineBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBaseMaintenanceDocumentRuleBase.processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument,
java.lang.String, org.kuali.rice.kns.bo.PersistableBusinessObject)
public boolean checkEndDateIsValid(Date endDate,
boolean canBeTodaysDateFlag)
endDate - canBeTodaysDateFlag -
public boolean validateEndDateForNewAddressLine(Date endDate)
public boolean validateEndDateForExistingCustomerAddress(Date newEndDate,
int ind)
public boolean checkNameIsValidLength(String customerName)
customerName - The name of the customer.
public boolean checkAddressIsValid(CustomerAddress customerAddress,
int ind)
customerAddress -
public boolean checkAddressIsValid(CustomerAddress customerAddress)
public boolean checkAddresses(Customer customer)
customer -
public boolean validateAddresses(Customer customer)
public boolean checkIfPrimaryAddressActive(Date newEndDate,
int ind)
public boolean checkTaxNumber(Customer customer)
customer -
public boolean isTaxNumberRequired()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||