org.kuali.kfs.fp.document.validation.impl
Class CreditCardVendorRule

java.lang.Object
  extended by org.kuali.rice.kns.rules.DocumentRuleBase
      extended by org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
          extended by org.kuali.kfs.fp.document.validation.impl.CreditCardVendorRule
All Implemented Interfaces:
org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRule, org.kuali.rice.kns.rule.AddAdHocRoutePersonRule, org.kuali.rice.kns.rule.AddAdHocRouteWorkgroupRule, org.kuali.rice.kns.rule.AddCollectionLineRule, org.kuali.rice.kns.rule.AddNoteRule, org.kuali.rice.kns.rule.ApproveDocumentRule, org.kuali.rice.kns.rule.BusinessRule, org.kuali.rice.kns.rule.RouteDocumentRule, org.kuali.rice.kns.rule.SaveDocumentRule, org.kuali.rice.kns.rule.SendAdHocRequestsRule

public class CreditCardVendorRule
extends org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase

This class represents business rules for the credit card vendor maintenance document


Field Summary
protected  CreditCardVendor newCreditCardVendor
           
 
Fields inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
boDictionaryService, boService, businessObjectAuthorizationService, configService, ddService, dictionaryValidationService, DOCUMENT_ERROR_PREFIX, documentHelperService, LOG, MAINTAINABLE_ERROR_PATH, MAINTAINABLE_ERROR_PREFIX, maintDocDictionaryService, persistenceService, persistenceStructureService, personService, priorErrorPath, roleService, workflowDocumentService
 
Constructor Summary
CreditCardVendorRule()
           
 
Method Summary
protected  boolean checkCreditCardVendorNumber()
          Returns true if credit card vendor number is valid (i.e.
protected  SubAccount checkExistenceSubAccount(String string)
          Returns a SubAccount object if SubAccount object exists for "Income" or "Expense"
protected  SubObjectCode checkExistenceSubObj(String string)
          Returns a SubObjCd object if SubObjCd object exists for "Income" or "Expense"
protected  boolean checkExistingActiveAccount(String accountNumber, String fieldName, String errorMessage)
          Returns true if account is active (i.e.
protected  boolean checkRequiredSubAccount(String string)
          Returns true if income/expense financial chart of accounts code and account number exist.
protected  boolean checkRequiredSubObjectCode(String string)
          Returns a true sub-object code exists for "Income" or "Expense"
protected  boolean processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
          Returns value from processCustomRouteDocumentBusinessRules(document)
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
          Returns true credit card vendor maintenance document is routed successfully
protected  boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
          Return true if rules for processing a save for the credit card maintenance document are are valid.
 void setupConvenienceObjects()
          Sets up a CreditCardVendor convenience objects to make sure all possible sub-objects are populated
 
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, processCustomAddCollectionLineBusinessRules, 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, 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

newCreditCardVendor

protected CreditCardVendor newCreditCardVendor
Constructor Detail

CreditCardVendorRule

public CreditCardVendorRule()
Method Detail

setupConvenienceObjects

public void setupConvenienceObjects()
Sets up a CreditCardVendor convenience objects to make sure all possible sub-objects are populated

Specified by:
setupConvenienceObjects in interface org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRule
Overrides:
setupConvenienceObjects in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
See Also:
MaintenanceDocumentRuleBase.setupConvenienceObjects()

processCustomSaveDocumentBusinessRules

protected boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
Return true if rules for processing a save for the credit card maintenance document are are valid.

Overrides:
processCustomSaveDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
Parameters:
document - maintenance document
Returns:
true credit card vendor number is valid
See Also:
MaintenanceDocumentRuleBase.processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)

processCustomApproveDocumentBusinessRules

protected boolean processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
Returns value from processCustomRouteDocumentBusinessRules(document)

Overrides:
processCustomApproveDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
Parameters:
document - maintenance document
Returns:
value from processCustomRouteDocumentBusinessRules(document)
See Also:
MaintenanceDocumentRuleBase.processCustomApproveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)

processCustomRouteDocumentBusinessRules

protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
Returns true credit card vendor maintenance document is routed successfully

Overrides:
processCustomRouteDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
Parameters:
document - submitted credit card maintenance document
Returns:
true if credit card vendor number, income/expense account numbers, income/expense sub-account numbers, and income/expense sub-object codes are valid
See Also:
MaintenanceDocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)

checkCreditCardVendorNumber

protected boolean checkCreditCardVendorNumber()
Returns true if credit card vendor number is valid (i.e. numeric and at least 5 digits)

Returns:
true if credit card vendor number is valid (i.e. numeric and at least 5 digits)

checkExistingActiveAccount

protected boolean checkExistingActiveAccount(String accountNumber,
                                             String fieldName,
                                             String errorMessage)
Returns true if account is active (i.e. exists and is not expired or closed)

Parameters:
accountNumber - account number
fieldName - field name to place error for
errorMessage - error message to display
Returns:
true if account is active (i.e. exists and is not expired or closed)

checkRequiredSubAccount

protected boolean checkRequiredSubAccount(String string)
Returns true if income/expense financial chart of accounts code and account number exist. Income or expense is determined by the "Income" value or the "Expense" value passed in to the method as a string

Parameters:
string - determines whether or not to check income or expense sub account information (valid values include "Income" or "Expense")
Returns:
true if corresponding sub account values exist

checkExistenceSubAccount

protected SubAccount checkExistenceSubAccount(String string)
Returns a SubAccount object if SubAccount object exists for "Income" or "Expense"

Parameters:
string - determines whether or not to retrieve a income or expense sub account (valid values include "Income" or "Expense")
Returns:
SubAccount Income/Expense SubAccount object

checkRequiredSubObjectCode

protected boolean checkRequiredSubObjectCode(String string)
Returns a true sub-object code exists for "Income" or "Expense"

Parameters:
string - determines whether or not to check for an income or expense sub-object code (valid values include "Income" or "Expense")
Returns:
true if income/expense chart of account code, account number, and financial object code exist

checkExistenceSubObj

protected SubObjectCode checkExistenceSubObj(String string)
Returns a SubObjCd object if SubObjCd object exists for "Income" or "Expense"

Parameters:
string - determines whether or not to retrieve a income or expense sub object (valid values include "Income" or "Expense")
Returns:
SubAccount Income/Expense SubObjCd object


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